zenkit-css 1.0.7 → 1.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zenkit-css",
3
- "version": "1.0.7",
3
+ "version": "1.2.0",
4
4
  "description": "A minimal, modern CSS framework for peaceful development",
5
5
  "main": "dist/zenkit.css",
6
6
  "scripts": {
@@ -0,0 +1,399 @@
1
+ // ========================================
2
+ // ZenKit - Alert Dialog Component
3
+ // ========================================
4
+
5
+ @use '../abstracts/variables' as *;
6
+
7
+ // ----------------------------------------
8
+ // Alert Dialog Overlay
9
+ // ----------------------------------------
10
+ .alert-dialog-overlay {
11
+ position: fixed;
12
+ inset: 0;
13
+ background-color: rgba(0, 0, 0, 0.5);
14
+ backdrop-filter: blur(2px);
15
+ -webkit-backdrop-filter: blur(2px);
16
+ z-index: 9999;
17
+ display: flex;
18
+ align-items: center;
19
+ justify-content: center;
20
+ padding: 1rem;
21
+ opacity: 0;
22
+ visibility: hidden;
23
+ transition: opacity $transition-base $transition-timing,
24
+ visibility $transition-base $transition-timing;
25
+ }
26
+
27
+ .alert-dialog-overlay.open {
28
+ opacity: 1;
29
+ visibility: visible;
30
+ }
31
+
32
+ // ----------------------------------------
33
+ // Alert Dialog Container
34
+ // ----------------------------------------
35
+ .alert-dialog {
36
+ position: relative;
37
+ width: 100%;
38
+ max-width: 400px;
39
+ background-color: var(--bg);
40
+ border-radius: $border-radius-lg;
41
+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
42
+ transform: scale(0.95) translateY(-10px);
43
+ opacity: 0;
44
+ transition: transform $transition-base $transition-timing,
45
+ opacity $transition-base $transition-timing;
46
+ }
47
+
48
+ .alert-dialog-overlay.open .alert-dialog {
49
+ transform: scale(1) translateY(0);
50
+ opacity: 1;
51
+ }
52
+
53
+ // ----------------------------------------
54
+ // Alert Dialog Header
55
+ // ----------------------------------------
56
+ .alert-dialog-header {
57
+ display: flex;
58
+ align-items: flex-start;
59
+ gap: 1rem;
60
+ padding: 1.25rem 1.5rem;
61
+ }
62
+
63
+ .alert-dialog-icon {
64
+ flex-shrink: 0;
65
+ display: flex;
66
+ align-items: center;
67
+ justify-content: center;
68
+ width: 2.5rem;
69
+ height: 2.5rem;
70
+ border-radius: 50%;
71
+ font-size: 1.25rem;
72
+ }
73
+
74
+ .alert-dialog-icon-danger {
75
+ background-color: var(--danger-100);
76
+ color: var(--danger);
77
+ }
78
+
79
+ .alert-dialog-icon-warning {
80
+ background-color: var(--warning-100);
81
+ color: var(--warning-700);
82
+ }
83
+
84
+ .alert-dialog-icon-success {
85
+ background-color: var(--success-100);
86
+ color: var(--success);
87
+ }
88
+
89
+ .alert-dialog-icon-info {
90
+ background-color: var(--info-100);
91
+ color: var(--info);
92
+ }
93
+
94
+ .alert-dialog-content {
95
+ flex: 1;
96
+ min-width: 0;
97
+ }
98
+
99
+ .alert-dialog-title {
100
+ font-size: var(--text-lg);
101
+ font-weight: $font-weight-semibold;
102
+ color: var(--text);
103
+ margin-bottom: 0.375rem;
104
+ }
105
+
106
+ .alert-dialog-description {
107
+ font-size: var(--text-sm);
108
+ color: var(--text-muted);
109
+ line-height: 1.5;
110
+ }
111
+
112
+ // ----------------------------------------
113
+ // Alert Dialog Body
114
+ // ----------------------------------------
115
+ .alert-dialog-body {
116
+ padding: 0 1.5rem 1rem;
117
+ }
118
+
119
+ // ----------------------------------------
120
+ // Alert Dialog Footer
121
+ // ----------------------------------------
122
+ .alert-dialog-footer {
123
+ display: flex;
124
+ align-items: center;
125
+ justify-content: flex-end;
126
+ gap: 0.75rem;
127
+ padding: 1rem 1.5rem;
128
+ background-color: var(--gray-50);
129
+ border-top: 1px solid var(--border);
130
+ border-radius: 0 0 $border-radius-lg $border-radius-lg;
131
+ }
132
+
133
+ .alert-dialog-footer-stacked {
134
+ flex-direction: column;
135
+
136
+ .alert-dialog-btn {
137
+ width: 100%;
138
+ }
139
+ }
140
+
141
+ // ----------------------------------------
142
+ // Alert Dialog Buttons
143
+ // ----------------------------------------
144
+ .alert-dialog-btn {
145
+ display: inline-flex;
146
+ align-items: center;
147
+ justify-content: center;
148
+ padding: 0.5rem 1rem;
149
+ font-size: var(--text-sm);
150
+ font-weight: $font-weight-medium;
151
+ border-radius: $border-radius;
152
+ cursor: pointer;
153
+ transition: all $transition-fast $transition-timing;
154
+ }
155
+
156
+ .alert-dialog-btn-cancel {
157
+ color: var(--text);
158
+ background-color: var(--white);
159
+ border: 1px solid var(--border);
160
+
161
+ &:hover {
162
+ background-color: var(--gray-50);
163
+ }
164
+ }
165
+
166
+ .alert-dialog-btn-confirm {
167
+ color: var(--white);
168
+ background-color: var(--primary);
169
+ border: 1px solid var(--primary);
170
+
171
+ &:hover {
172
+ background-color: var(--primary-600);
173
+ border-color: var(--primary-600);
174
+ }
175
+ }
176
+
177
+ .alert-dialog-btn-danger {
178
+ color: var(--white);
179
+ background-color: var(--danger);
180
+ border: 1px solid var(--danger);
181
+
182
+ &:hover {
183
+ background-color: var(--danger-600);
184
+ border-color: var(--danger-600);
185
+ }
186
+ }
187
+
188
+ .alert-dialog-btn-loading {
189
+ position: relative;
190
+ pointer-events: none;
191
+ color: transparent;
192
+
193
+ &::after {
194
+ content: "";
195
+ position: absolute;
196
+ width: 1rem;
197
+ height: 1rem;
198
+ border: 2px solid currentColor;
199
+ border-top-color: transparent;
200
+ border-radius: 50%;
201
+ animation: alert-dialog-spin 0.6s linear infinite;
202
+ }
203
+ }
204
+
205
+ .alert-dialog-btn-confirm.alert-dialog-btn-loading::after {
206
+ border-color: var(--white);
207
+ border-top-color: transparent;
208
+ }
209
+
210
+ @keyframes alert-dialog-spin {
211
+ to {
212
+ transform: rotate(360deg);
213
+ }
214
+ }
215
+
216
+ // ----------------------------------------
217
+ // Alert Dialog Variants
218
+ // ----------------------------------------
219
+
220
+ // Destructive
221
+ .alert-dialog-destructive {
222
+ .alert-dialog-title {
223
+ color: var(--danger);
224
+ }
225
+ }
226
+
227
+ // Centered
228
+ .alert-dialog-centered {
229
+ text-align: center;
230
+
231
+ .alert-dialog-header {
232
+ flex-direction: column;
233
+ align-items: center;
234
+ }
235
+
236
+ .alert-dialog-footer {
237
+ justify-content: center;
238
+ }
239
+ }
240
+
241
+ // Without Icon
242
+ .alert-dialog-no-icon {
243
+ .alert-dialog-header {
244
+ gap: 0;
245
+ }
246
+ }
247
+
248
+ // ----------------------------------------
249
+ // Alert Dialog Sizes
250
+ // ----------------------------------------
251
+ .alert-dialog-sm {
252
+ max-width: 320px;
253
+ }
254
+
255
+ .alert-dialog-lg {
256
+ max-width: 500px;
257
+ }
258
+
259
+ .alert-dialog-xl {
260
+ max-width: 600px;
261
+ }
262
+
263
+ // ----------------------------------------
264
+ // Alert Dialog Close Button
265
+ // ----------------------------------------
266
+ .alert-dialog-close {
267
+ position: absolute;
268
+ top: 0.75rem;
269
+ right: 0.75rem;
270
+ display: flex;
271
+ align-items: center;
272
+ justify-content: center;
273
+ width: 2rem;
274
+ height: 2rem;
275
+ padding: 0;
276
+ color: var(--text-muted);
277
+ background: transparent;
278
+ border: none;
279
+ border-radius: $border-radius;
280
+ cursor: pointer;
281
+ transition: all $transition-fast $transition-timing;
282
+
283
+ &:hover {
284
+ background-color: var(--gray-100);
285
+ color: var(--text);
286
+ }
287
+
288
+ svg {
289
+ width: 1rem;
290
+ height: 1rem;
291
+ }
292
+ }
293
+
294
+ // ----------------------------------------
295
+ // Alert Dialog Input (Prompt)
296
+ // ----------------------------------------
297
+ .alert-dialog-input {
298
+ width: 100%;
299
+ padding: 0.625rem 0.875rem;
300
+ font-size: var(--text-sm);
301
+ color: var(--text);
302
+ background-color: var(--bg);
303
+ border: 1px solid var(--border);
304
+ border-radius: $border-radius;
305
+ margin-top: 0.75rem;
306
+ transition: border-color $transition-fast $transition-timing,
307
+ box-shadow $transition-fast $transition-timing;
308
+
309
+ &:focus {
310
+ outline: none;
311
+ border-color: var(--primary);
312
+ box-shadow: 0 0 0 3px rgba($primary, 0.15);
313
+ }
314
+
315
+ &::placeholder {
316
+ color: var(--text-muted);
317
+ }
318
+ }
319
+
320
+ // ----------------------------------------
321
+ // Animation Variants
322
+ // ----------------------------------------
323
+ .alert-dialog-slide-up {
324
+ .alert-dialog {
325
+ transform: translateY(20px);
326
+ }
327
+
328
+ &.open .alert-dialog {
329
+ transform: translateY(0);
330
+ }
331
+ }
332
+
333
+ .alert-dialog-slide-down {
334
+ align-items: flex-start;
335
+ padding-top: 10vh;
336
+
337
+ .alert-dialog {
338
+ transform: translateY(-20px);
339
+ }
340
+
341
+ &.open .alert-dialog {
342
+ transform: translateY(0);
343
+ }
344
+ }
345
+
346
+ // ----------------------------------------
347
+ // Dark Mode
348
+ // ----------------------------------------
349
+ [data-theme="dark"] {
350
+ .alert-dialog-overlay {
351
+ background-color: rgba(0, 0, 0, 0.7);
352
+ }
353
+
354
+ .alert-dialog {
355
+ background-color: var(--gray-900);
356
+ box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
357
+ }
358
+
359
+ .alert-dialog-footer {
360
+ background-color: var(--gray-800);
361
+ border-color: var(--gray-700);
362
+ }
363
+
364
+ .alert-dialog-btn-cancel {
365
+ background-color: var(--gray-800);
366
+ border-color: var(--gray-600);
367
+ color: var(--gray-200);
368
+
369
+ &:hover {
370
+ background-color: var(--gray-700);
371
+ }
372
+ }
373
+
374
+ .alert-dialog-close:hover {
375
+ background-color: var(--gray-800);
376
+ }
377
+
378
+ .alert-dialog-input {
379
+ background-color: var(--gray-800);
380
+ border-color: var(--gray-700);
381
+ color: var(--gray-100);
382
+ }
383
+
384
+ .alert-dialog-icon-danger {
385
+ background-color: rgba($danger, 0.2);
386
+ }
387
+
388
+ .alert-dialog-icon-warning {
389
+ background-color: rgba($warning, 0.2);
390
+ }
391
+
392
+ .alert-dialog-icon-success {
393
+ background-color: rgba($success, 0.2);
394
+ }
395
+
396
+ .alert-dialog-icon-info {
397
+ background-color: rgba($info, 0.2);
398
+ }
399
+ }