@abstraks-dev/ui-library 2.2.0 → 2.3.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.
@@ -0,0 +1,253 @@
1
+ @use 'variables' as *;
2
+
3
+ .modal-overlay {
4
+ position: fixed;
5
+ top: 0;
6
+ left: 0;
7
+ right: 0;
8
+ bottom: 0;
9
+ background-color: rgba(0, 0, 0, 0.6);
10
+ backdrop-filter: blur(4px);
11
+ z-index: 9999;
12
+ display: flex;
13
+ align-items: center;
14
+ justify-content: center;
15
+ padding: 1rem;
16
+ animation: fadeIn 0.2s ease-out;
17
+ overflow-y: auto;
18
+
19
+ @media (prefers-reduced-motion: reduce) {
20
+ animation: none;
21
+ }
22
+ }
23
+
24
+ .modal {
25
+ background: $color-white;
26
+ border-radius: 8px;
27
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
28
+ display: flex;
29
+ flex-direction: column;
30
+ max-height: calc(100vh - 2rem);
31
+ width: 100%;
32
+ animation: slideIn 0.3s ease-out;
33
+ position: relative;
34
+
35
+ @media (prefers-reduced-motion: reduce) {
36
+ animation: none;
37
+ }
38
+
39
+ // Dark mode support
40
+ @media (prefers-color-scheme: dark) {
41
+ background: #1e1e1e;
42
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
43
+ }
44
+
45
+ // Size variants
46
+ &--sm {
47
+ max-width: 400px;
48
+ }
49
+
50
+ &--md {
51
+ max-width: 600px;
52
+ }
53
+
54
+ &--lg {
55
+ max-width: 800px;
56
+ }
57
+
58
+ &--xl {
59
+ max-width: 1200px;
60
+ }
61
+
62
+ &--full {
63
+ max-width: calc(100vw - 2rem);
64
+ max-height: calc(100vh - 2rem);
65
+ }
66
+
67
+ &--centered {
68
+ margin: auto;
69
+ }
70
+
71
+ // Header
72
+ &__header {
73
+ display: flex;
74
+ align-items: center;
75
+ justify-content: space-between;
76
+ padding: 1.5rem;
77
+ border-bottom: 1px solid $gray-200;
78
+ flex-shrink: 0;
79
+
80
+ @media (prefers-color-scheme: dark) {
81
+ border-bottom-color: #333;
82
+ }
83
+ }
84
+
85
+ &__title {
86
+ margin: 0;
87
+ font-size: 1.25rem;
88
+ font-weight: 600;
89
+ color: $gray-900;
90
+ flex: 1;
91
+
92
+ @media (prefers-color-scheme: dark) {
93
+ color: $color-white;
94
+ }
95
+ }
96
+
97
+ &__close {
98
+ display: flex;
99
+ align-items: center;
100
+ justify-content: center;
101
+ background: transparent;
102
+ border: none;
103
+ padding: 0.5rem;
104
+ margin: -0.5rem -0.5rem -0.5rem 1rem;
105
+ cursor: pointer;
106
+ color: $gray-600;
107
+ border-radius: 4px;
108
+ transition: all 0.15s ease;
109
+ flex-shrink: 0;
110
+
111
+ &:hover {
112
+ background: $gray-100;
113
+ color: $gray-900;
114
+
115
+ @media (prefers-color-scheme: dark) {
116
+ background: #333;
117
+ color: $color-white;
118
+ }
119
+ }
120
+
121
+ &:focus-visible {
122
+ outline: 2px solid $color-primary;
123
+ outline-offset: 2px;
124
+ }
125
+
126
+ svg {
127
+ display: block;
128
+ }
129
+ }
130
+
131
+ // Body
132
+ &__body {
133
+ padding: 1.5rem;
134
+ overflow-y: auto;
135
+ flex: 1;
136
+ color: $gray-700;
137
+
138
+ @media (prefers-color-scheme: dark) {
139
+ color: $gray-300;
140
+ }
141
+
142
+ // Custom scrollbar
143
+ &::-webkit-scrollbar {
144
+ width: 8px;
145
+ }
146
+
147
+ &::-webkit-scrollbar-track {
148
+ background: $gray-100;
149
+ border-radius: 4px;
150
+
151
+ @media (prefers-color-scheme: dark) {
152
+ background: #2a2a2a;
153
+ }
154
+ }
155
+
156
+ &::-webkit-scrollbar-thumb {
157
+ background: $gray-400;
158
+ border-radius: 4px;
159
+
160
+ &:hover {
161
+ background: $gray-500;
162
+ }
163
+
164
+ @media (prefers-color-scheme: dark) {
165
+ background: #555;
166
+
167
+ &:hover {
168
+ background: #666;
169
+ }
170
+ }
171
+ }
172
+ }
173
+
174
+ // Footer
175
+ &__footer {
176
+ display: flex;
177
+ align-items: center;
178
+ justify-content: flex-end;
179
+ gap: 0.75rem;
180
+ padding: 1.5rem;
181
+ border-top: 1px solid $gray-200;
182
+ flex-shrink: 0;
183
+
184
+ @media (prefers-color-scheme: dark) {
185
+ border-top-color: #333;
186
+ }
187
+ }
188
+ }
189
+
190
+ // Animations
191
+ @keyframes fadeIn {
192
+ from {
193
+ opacity: 0;
194
+ }
195
+ to {
196
+ opacity: 1;
197
+ }
198
+ }
199
+
200
+ @keyframes slideIn {
201
+ from {
202
+ opacity: 0;
203
+ transform: translateY(-20px) scale(0.95);
204
+ }
205
+ to {
206
+ opacity: 1;
207
+ transform: translateY(0) scale(1);
208
+ }
209
+ }
210
+
211
+ // Mobile responsive
212
+ @media (max-width: 640px) {
213
+ .modal-overlay {
214
+ padding: 0.5rem;
215
+ }
216
+
217
+ .modal {
218
+ max-height: calc(100vh - 1rem);
219
+
220
+ &--sm,
221
+ &--md,
222
+ &--lg,
223
+ &--xl {
224
+ max-width: 100%;
225
+ }
226
+
227
+ &__header,
228
+ &__body,
229
+ &__footer {
230
+ padding: 1rem;
231
+ }
232
+
233
+ &__title {
234
+ font-size: 1.125rem;
235
+ }
236
+ }
237
+ }
238
+
239
+ // High contrast mode
240
+ @media (prefers-contrast: high) {
241
+ .modal {
242
+ border: 2px solid currentColor;
243
+
244
+ &__header,
245
+ &__footer {
246
+ border-color: currentColor;
247
+ }
248
+
249
+ &__close:focus-visible {
250
+ outline-width: 3px;
251
+ }
252
+ }
253
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abstraks-dev/ui-library",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "User Interface library",
5
5
  "main": "dist/index.js",
6
6
  "files": [
@@ -79,7 +79,7 @@
79
79
  "libphonenumber-js": "^1.12.10",
80
80
  "react-transition-group": "^4.4.5",
81
81
  "uuid": "^13.0.0",
82
- "validator": "^13.15.20"
82
+ "validator": "^13.15.22"
83
83
  },
84
84
  "bugs": {
85
85
  "url": "https://github.com/Abstraks-co/ui-library/issues"