@abstraks-dev/ui-library 2.2.1 → 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,332 @@
1
+ :root {
2
+ --small: (min-width: 607px);
3
+ --medium: (min-width: 768px);
4
+ --large: (min-width: 992px);
5
+ --xlarge: (min-width: 1200px);
6
+ --color-primary: #009900;
7
+ --color-primary-hover: rgba(1, 116, 1, 0.9);
8
+ --color-secondary: #7086f1;
9
+ --color-secondary-hover: rgba(83, 100, 185, 0.9);
10
+ --color-warning: #ff9800;
11
+ --color-warning-hover: rgba(214, 130, 4, 0.9);
12
+ --color-success: #57f500;
13
+ --color-success-hover: rgba(74, 207, 2, 0.9);
14
+ --color-error: #f44336;
15
+ --color-error-hover: rgba(216, 58, 47, 0.9);
16
+ --color-shade: rgba(0, 0, 0, 0.5);
17
+ --color-tint: rgba(250, 250, 250, 0.5);
18
+ --color-white: #fff;
19
+ --color-black: #000;
20
+ --color-font-body: #333;
21
+ --color-black-alpha: rgba(0, 0, 0, 0.6);
22
+ --focus-color: #4d90fe;
23
+ --shadow-primary: rgba(0, 153, 0, 0.2);
24
+ --shadow-primary-hover: rgba(0, 153, 0, 0.3);
25
+ --shadow-primary-strong: rgba(0, 153, 0, 0.4);
26
+ --shadow-primary-strongest: rgba(0, 153, 0, 0.5);
27
+ --shadow-secondary: rgba(112, 134, 241, 0.2);
28
+ --shadow-secondary-hover: rgba(112, 134, 241, 0.3);
29
+ --shadow-secondary-strong: rgba(112, 134, 241, 0.4);
30
+ --shadow-secondary-strongest: rgba(112, 134, 241, 0.5);
31
+ --shadow-success: rgba(87, 245, 0, 0.2);
32
+ --shadow-success-hover: rgba(87, 245, 0, 0.3);
33
+ --shadow-success-strong: rgba(87, 245, 0, 0.4);
34
+ --shadow-success-strongest: rgba(87, 245, 0, 0.5);
35
+ --shadow-error: rgba(244, 67, 54, 0.2);
36
+ --shadow-error-hover: rgba(244, 67, 54, 0.3);
37
+ --shadow-error-strong: rgba(244, 67, 54, 0.4);
38
+ --shadow-error-strongest: rgba(244, 67, 54, 0.5);
39
+ --shadow-warning: rgba(255, 152, 0, 0.2);
40
+ --shadow-warning-hover: rgba(255, 152, 0, 0.3);
41
+ --shadow-warning-strong: rgba(255, 152, 0, 0.4);
42
+ --shadow-warning-strongest: rgba(255, 152, 0, 0.5);
43
+ --border-radius-xs: 4px;
44
+ --border-radius-sm: 4px;
45
+ --border-radius-md: 6px;
46
+ --border-radius-lg: 8px;
47
+ --border-radius-xl: 10px;
48
+ --z-index-base: 1;
49
+ --z-index-low: 10;
50
+ --z-index-dropdown: 100;
51
+ --z-index-sticky: 200;
52
+ --z-index-popover: 300;
53
+ --z-index-tooltip: 400;
54
+ --z-index-overlay: 1000;
55
+ --z-index-modal: 1010;
56
+ --z-index-notification: 1020;
57
+ --gray-100: #f8f9fa;
58
+ --gray-200: #e9ecef;
59
+ --gray-300: #dee2e6;
60
+ --gray-400: #ced4da;
61
+ --gray-500: #adb5bd;
62
+ --gray-600: #6c757d;
63
+ --gray-700: #495057;
64
+ --gray-800: #343a40;
65
+ --gray-900: #212529;
66
+ --black: #000;
67
+ --color-muted-blue: #8793ab;
68
+ --heading-one: 2.5rem;
69
+ --heading-two: 2rem;
70
+ --heading-three: 1.75rem;
71
+ --heading-four: 1.5rem;
72
+ --heading-five: 1.25rem;
73
+ --heading-six: 1rem;
74
+ --font-family-body: Lato, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
75
+ --font-size-xs: 0.75rem;
76
+ --font-size-sm: 0.875rem;
77
+ --font-size-base: 1rem;
78
+ --font-size-lg: 1.125rem;
79
+ --font-size-xl: 1.25rem;
80
+ --line-height-tight: 1.25;
81
+ --line-height-base: 1.5;
82
+ --line-height-relaxed: 1.625;
83
+ --font-weight-light: 300;
84
+ --font-weight-normal: 400;
85
+ --font-weight-medium: 500;
86
+ --font-weight-semibold: 600;
87
+ --font-weight-bold: 700;
88
+ --spacing-xs: 0.25rem;
89
+ --spacing-sm: 0.5rem;
90
+ --spacing-md: 1rem;
91
+ --spacing-lg: 1.5rem;
92
+ --spacing-xl: 2rem;
93
+ --spacing-2xl: 3rem;
94
+ --text-color: #1f2937;
95
+ --text-muted: #6b7280;
96
+ --background-color: #ffffff;
97
+ --border-color: #d1d5db;
98
+ --border-color-hover: #9ca3af;
99
+ --error-text: #dc2626;
100
+ --error-background: #fef2f2;
101
+ --error-border: #fecaca;
102
+ --success-text: #059669;
103
+ --success-background: #f0fdf4;
104
+ --success-border: #bbf7d0;
105
+ --warning-text: #d97706;
106
+ --warning-background: #fffbeb;
107
+ --warning-border: #fed7aa;
108
+ --primary-color: #3b82f6;
109
+ --focus-ring-color: #3b82f6;
110
+ --border-radius: 0.375rem;
111
+ }
112
+
113
+ .modal-overlay {
114
+ position: fixed;
115
+ top: 0;
116
+ left: 0;
117
+ right: 0;
118
+ bottom: 0;
119
+ background-color: rgba(0, 0, 0, 0.6);
120
+ backdrop-filter: blur(4px);
121
+ z-index: 9999;
122
+ display: flex;
123
+ align-items: center;
124
+ justify-content: center;
125
+ padding: 1rem;
126
+ animation: fadeIn 0.2s ease-out;
127
+ overflow-y: auto;
128
+ }
129
+ @media (prefers-reduced-motion: reduce) {
130
+ .modal-overlay {
131
+ animation: none;
132
+ }
133
+ }
134
+
135
+ .modal {
136
+ background: #fff;
137
+ border-radius: 8px;
138
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
139
+ display: flex;
140
+ flex-direction: column;
141
+ max-height: calc(100vh - 2rem);
142
+ width: 100%;
143
+ animation: slideIn 0.3s ease-out;
144
+ position: relative;
145
+ }
146
+ @media (prefers-reduced-motion: reduce) {
147
+ .modal {
148
+ animation: none;
149
+ }
150
+ }
151
+ @media (prefers-color-scheme: dark) {
152
+ .modal {
153
+ background: #1e1e1e;
154
+ box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
155
+ }
156
+ }
157
+ .modal--sm {
158
+ max-width: 400px;
159
+ }
160
+ .modal--md {
161
+ max-width: 600px;
162
+ }
163
+ .modal--lg {
164
+ max-width: 800px;
165
+ }
166
+ .modal--xl {
167
+ max-width: 1200px;
168
+ }
169
+ .modal--full {
170
+ max-width: calc(100vw - 2rem);
171
+ max-height: calc(100vh - 2rem);
172
+ }
173
+ .modal--centered {
174
+ margin: auto;
175
+ }
176
+ .modal__header {
177
+ display: flex;
178
+ align-items: center;
179
+ justify-content: space-between;
180
+ padding: 1.5rem;
181
+ border-bottom: 1px solid #e9ecef;
182
+ flex-shrink: 0;
183
+ }
184
+ @media (prefers-color-scheme: dark) {
185
+ .modal__header {
186
+ border-bottom-color: #333;
187
+ }
188
+ }
189
+ .modal__title {
190
+ margin: 0;
191
+ font-size: 1.25rem;
192
+ font-weight: 600;
193
+ color: #212529;
194
+ flex: 1;
195
+ }
196
+ @media (prefers-color-scheme: dark) {
197
+ .modal__title {
198
+ color: #fff;
199
+ }
200
+ }
201
+ .modal__close {
202
+ display: flex;
203
+ align-items: center;
204
+ justify-content: center;
205
+ background: transparent;
206
+ border: none;
207
+ padding: 0.5rem;
208
+ margin: -0.5rem -0.5rem -0.5rem 1rem;
209
+ cursor: pointer;
210
+ color: #6c757d;
211
+ border-radius: 4px;
212
+ transition: all 0.15s ease;
213
+ flex-shrink: 0;
214
+ }
215
+ .modal__close:hover {
216
+ background: #f8f9fa;
217
+ color: #212529;
218
+ }
219
+ @media (prefers-color-scheme: dark) {
220
+ .modal__close:hover {
221
+ background: #333;
222
+ color: #fff;
223
+ }
224
+ }
225
+ .modal__close:focus-visible {
226
+ outline: 2px solid #009900;
227
+ outline-offset: 2px;
228
+ }
229
+ .modal__close svg {
230
+ display: block;
231
+ }
232
+ .modal__body {
233
+ padding: 1.5rem;
234
+ overflow-y: auto;
235
+ flex: 1;
236
+ color: #495057;
237
+ }
238
+ @media (prefers-color-scheme: dark) {
239
+ .modal__body {
240
+ color: #dee2e6;
241
+ }
242
+ }
243
+ .modal__body::-webkit-scrollbar {
244
+ width: 8px;
245
+ }
246
+ .modal__body::-webkit-scrollbar-track {
247
+ background: #f8f9fa;
248
+ border-radius: 4px;
249
+ }
250
+ @media (prefers-color-scheme: dark) {
251
+ .modal__body::-webkit-scrollbar-track {
252
+ background: #2a2a2a;
253
+ }
254
+ }
255
+ .modal__body::-webkit-scrollbar-thumb {
256
+ background: #ced4da;
257
+ border-radius: 4px;
258
+ }
259
+ .modal__body::-webkit-scrollbar-thumb:hover {
260
+ background: #adb5bd;
261
+ }
262
+ @media (prefers-color-scheme: dark) {
263
+ .modal__body::-webkit-scrollbar-thumb {
264
+ background: #555;
265
+ }
266
+ .modal__body::-webkit-scrollbar-thumb:hover {
267
+ background: #666;
268
+ }
269
+ }
270
+ .modal__footer {
271
+ display: flex;
272
+ align-items: center;
273
+ justify-content: flex-end;
274
+ gap: 0.75rem;
275
+ padding: 1.5rem;
276
+ border-top: 1px solid #e9ecef;
277
+ flex-shrink: 0;
278
+ }
279
+ @media (prefers-color-scheme: dark) {
280
+ .modal__footer {
281
+ border-top-color: #333;
282
+ }
283
+ }
284
+
285
+ @keyframes fadeIn {
286
+ from {
287
+ opacity: 0;
288
+ }
289
+ to {
290
+ opacity: 1;
291
+ }
292
+ }
293
+ @keyframes slideIn {
294
+ from {
295
+ opacity: 0;
296
+ transform: translateY(-20px) scale(0.95);
297
+ }
298
+ to {
299
+ opacity: 1;
300
+ transform: translateY(0) scale(1);
301
+ }
302
+ }
303
+ @media (max-width: 640px) {
304
+ .modal-overlay {
305
+ padding: 0.5rem;
306
+ }
307
+ .modal {
308
+ max-height: calc(100vh - 1rem);
309
+ }
310
+ .modal--sm, .modal--md, .modal--lg, .modal--xl {
311
+ max-width: 100%;
312
+ }
313
+ .modal__header, .modal__body, .modal__footer {
314
+ padding: 1rem;
315
+ }
316
+ .modal__title {
317
+ font-size: 1.125rem;
318
+ }
319
+ }
320
+ @media (prefers-contrast: high) {
321
+ .modal {
322
+ border: 2px solid currentColor;
323
+ }
324
+ .modal__header, .modal__footer {
325
+ border-color: currentColor;
326
+ }
327
+ .modal__close:focus-visible {
328
+ outline-width: 3px;
329
+ }
330
+ }
331
+
332
+ /*# sourceMappingURL=modal.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sourceRoot":"","sources":["../../src/styles/_variables.scss","../../src/styles/modal.scss"],"names":[],"mappings":"AAgSA;EAJE;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;EAAA;;;AC1RF;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAhBD;IAiBE;;;;AAIF;EACC,YDCa;ECAb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAXD;IAYE;;;AAID;EAhBD;IAiBE;IACA;;;AAID;EACC;;AAGD;EACC;;AAGD;EACC;;AAGD;EACC;;AAGD;EACC;EACA;;AAGD;EACC;;AAID;EACC;EACA;EACA;EACA;EACA;EACA;;AAEA;EARD;IASE;;;AAIF;EACC;EACA;EACA;EACA,ODIS;ECHT;;AAEA;EAPD;IAQE,ODnEW;;;ACuEb;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,ODhBS;ECiBT;EACA;EACA;;AAEA;EACC,YD3BQ;EC4BR,ODpBQ;;ACsBR;EAJD;IAKE;IACA,OD3FU;;;AC+FZ;EACC;EACA;;AAGD;EACC;;AAKF;EACC;EACA;EACA;EACA,OD7CS;;AC+CT;EAND;IAOE,ODpDQ;;;ACwDT;EACC;;AAGD;EACC,YD/DQ;ECgER;;AAEA;EAJD;IAKE;;;AAIF;EACC,YDrEQ;ECsER;;AAEA;EACC,YDxEO;;AC2ER;EARD;IASE;;EAEA;IACC;;;AAOJ;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EATD;IAUE;;;;AAMH;EACC;IACC;;EAED;IACC;;;AAIF;EACC;IACC;IACA;;EAED;IACC;IACA;;;AAKF;EACC;IACC;;EAGD;IACC;;EAEA;IAIC;;EAGD;IAGC;;EAGD;IACC;;;AAMH;EACC;IACC;;EAEA;IAEC;;EAGD;IACC","file":"modal.css"}
@@ -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.1",
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"