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.
@@ -0,0 +1,445 @@
1
+ // ========================================
2
+ // ZenKit - Resizable Component
3
+ // ========================================
4
+
5
+ @use '../abstracts/variables' as *;
6
+
7
+ // ----------------------------------------
8
+ // Resizable Container
9
+ // ----------------------------------------
10
+ .resizable {
11
+ position: relative;
12
+ display: flex;
13
+ }
14
+
15
+ .resizable-vertical {
16
+ flex-direction: column;
17
+ }
18
+
19
+ .resizable-horizontal {
20
+ flex-direction: row;
21
+ }
22
+
23
+ // ----------------------------------------
24
+ // Resizable Panel
25
+ // ----------------------------------------
26
+ .resizable-panel {
27
+ position: relative;
28
+ overflow: auto;
29
+ }
30
+
31
+ .resizable-panel-content {
32
+ height: 100%;
33
+ width: 100%;
34
+ overflow: auto;
35
+ }
36
+
37
+ // ----------------------------------------
38
+ // Resizable Handle
39
+ // ----------------------------------------
40
+ .resizable-handle {
41
+ position: relative;
42
+ flex-shrink: 0;
43
+ background-color: var(--border);
44
+ transition: background-color $transition-fast $transition-timing;
45
+ z-index: 10;
46
+
47
+ &:hover {
48
+ background-color: var(--primary);
49
+ }
50
+
51
+ &:active {
52
+ background-color: var(--primary-600);
53
+ }
54
+ }
55
+
56
+ // Horizontal handle (for vertical split)
57
+ .resizable-handle-horizontal {
58
+ width: 100%;
59
+ height: 4px;
60
+ cursor: row-resize;
61
+
62
+ &::before {
63
+ content: "";
64
+ position: absolute;
65
+ top: 50%;
66
+ left: 50%;
67
+ transform: translate(-50%, -50%);
68
+ width: 32px;
69
+ height: 4px;
70
+ background-color: var(--gray-400);
71
+ border-radius: 2px;
72
+ }
73
+ }
74
+
75
+ // Vertical handle (for horizontal split)
76
+ .resizable-handle-vertical {
77
+ width: 4px;
78
+ height: 100%;
79
+ cursor: col-resize;
80
+
81
+ &::before {
82
+ content: "";
83
+ position: absolute;
84
+ top: 50%;
85
+ left: 50%;
86
+ transform: translate(-50%, -50%);
87
+ width: 4px;
88
+ height: 32px;
89
+ background-color: var(--gray-400);
90
+ border-radius: 2px;
91
+ }
92
+ }
93
+
94
+ // ----------------------------------------
95
+ // Handle Variants
96
+ // ----------------------------------------
97
+
98
+ // Minimal handle
99
+ .resizable-handle-minimal {
100
+ background-color: transparent;
101
+
102
+ &::before {
103
+ display: none;
104
+ }
105
+
106
+ &:hover {
107
+ background-color: var(--primary-100);
108
+ }
109
+ }
110
+
111
+ // Bordered handle
112
+ .resizable-handle-bordered {
113
+ background-color: var(--bg);
114
+ border: 1px solid var(--border);
115
+
116
+ &.resizable-handle-horizontal {
117
+ height: 8px;
118
+ border-left: none;
119
+ border-right: none;
120
+ }
121
+
122
+ &.resizable-handle-vertical {
123
+ width: 8px;
124
+ border-top: none;
125
+ border-bottom: none;
126
+ }
127
+ }
128
+
129
+ // Dots handle
130
+ .resizable-handle-dots {
131
+ &::before {
132
+ background: transparent;
133
+ }
134
+
135
+ &::after {
136
+ content: "···";
137
+ position: absolute;
138
+ top: 50%;
139
+ left: 50%;
140
+ transform: translate(-50%, -50%);
141
+ color: var(--gray-400);
142
+ font-size: 0.875rem;
143
+ letter-spacing: 2px;
144
+ }
145
+
146
+ &.resizable-handle-vertical::after {
147
+ content: "⋮";
148
+ writing-mode: vertical-rl;
149
+ letter-spacing: 0;
150
+ }
151
+ }
152
+
153
+ // ----------------------------------------
154
+ // Handle Sizes
155
+ // ----------------------------------------
156
+ .resizable-handle-sm {
157
+ &.resizable-handle-horizontal {
158
+ height: 2px;
159
+
160
+ &::before {
161
+ width: 24px;
162
+ height: 2px;
163
+ }
164
+ }
165
+
166
+ &.resizable-handle-vertical {
167
+ width: 2px;
168
+
169
+ &::before {
170
+ width: 2px;
171
+ height: 24px;
172
+ }
173
+ }
174
+ }
175
+
176
+ .resizable-handle-lg {
177
+ &.resizable-handle-horizontal {
178
+ height: 8px;
179
+
180
+ &::before {
181
+ width: 48px;
182
+ height: 6px;
183
+ }
184
+ }
185
+
186
+ &.resizable-handle-vertical {
187
+ width: 8px;
188
+
189
+ &::before {
190
+ width: 6px;
191
+ height: 48px;
192
+ }
193
+ }
194
+ }
195
+
196
+ // ----------------------------------------
197
+ // Resizing State
198
+ // ----------------------------------------
199
+ .resizable-resizing {
200
+ user-select: none;
201
+ cursor: col-resize;
202
+
203
+ &.resizable-vertical {
204
+ cursor: row-resize;
205
+ }
206
+ }
207
+
208
+ .resizable-resizing .resizable-handle {
209
+ background-color: var(--primary);
210
+ }
211
+
212
+ // ----------------------------------------
213
+ // Collapsed Panel
214
+ // ----------------------------------------
215
+ .resizable-panel-collapsed {
216
+ flex: 0 0 0 !important;
217
+ min-width: 0 !important;
218
+ min-height: 0 !important;
219
+ overflow: hidden;
220
+ }
221
+
222
+ .resizable-collapse-btn {
223
+ position: absolute;
224
+ display: flex;
225
+ align-items: center;
226
+ justify-content: center;
227
+ width: 1.5rem;
228
+ height: 1.5rem;
229
+ background-color: var(--bg);
230
+ border: 1px solid var(--border);
231
+ border-radius: 50%;
232
+ cursor: pointer;
233
+ z-index: 20;
234
+ transition: all $transition-fast $transition-timing;
235
+
236
+ &:hover {
237
+ background-color: var(--gray-100);
238
+ border-color: var(--primary);
239
+ }
240
+
241
+ svg {
242
+ width: 0.75rem;
243
+ height: 0.75rem;
244
+ transition: transform $transition-fast $transition-timing;
245
+ }
246
+ }
247
+
248
+ .resizable-handle-vertical .resizable-collapse-btn {
249
+ top: 50%;
250
+ left: 50%;
251
+ transform: translate(-50%, -50%);
252
+ }
253
+
254
+ .resizable-handle-horizontal .resizable-collapse-btn {
255
+ top: 50%;
256
+ left: 50%;
257
+ transform: translate(-50%, -50%);
258
+ }
259
+
260
+ // ----------------------------------------
261
+ // Constraints Indicator
262
+ // ----------------------------------------
263
+ .resizable-handle.at-min,
264
+ .resizable-handle.at-max {
265
+ background-color: var(--warning);
266
+ cursor: not-allowed;
267
+ }
268
+
269
+ // ----------------------------------------
270
+ // Split Layout Presets
271
+ // ----------------------------------------
272
+ .resizable-split-50-50 {
273
+ .resizable-panel {
274
+ flex: 1 1 50%;
275
+ }
276
+ }
277
+
278
+ .resizable-split-30-70 {
279
+ .resizable-panel:first-child {
280
+ flex: 0 0 30%;
281
+ }
282
+
283
+ .resizable-panel:last-child {
284
+ flex: 1 1 70%;
285
+ }
286
+ }
287
+
288
+ .resizable-split-70-30 {
289
+ .resizable-panel:first-child {
290
+ flex: 1 1 70%;
291
+ }
292
+
293
+ .resizable-panel:last-child {
294
+ flex: 0 0 30%;
295
+ }
296
+ }
297
+
298
+ .resizable-split-25-75 {
299
+ .resizable-panel:first-child {
300
+ flex: 0 0 25%;
301
+ }
302
+
303
+ .resizable-panel:last-child {
304
+ flex: 1 1 75%;
305
+ }
306
+ }
307
+
308
+ // ----------------------------------------
309
+ // Nested Resizable
310
+ // ----------------------------------------
311
+ .resizable-nested {
312
+ height: 100%;
313
+ width: 100%;
314
+ }
315
+
316
+ // ----------------------------------------
317
+ // Resizable Box (Single Element)
318
+ // ----------------------------------------
319
+ .resizable-box {
320
+ position: relative;
321
+ display: inline-block;
322
+ }
323
+
324
+ .resizable-box-handle {
325
+ position: absolute;
326
+ background-color: transparent;
327
+
328
+ &:hover {
329
+ background-color: var(--primary-100);
330
+ }
331
+ }
332
+
333
+ .resizable-box-handle-e {
334
+ right: 0;
335
+ top: 0;
336
+ bottom: 0;
337
+ width: 8px;
338
+ cursor: e-resize;
339
+ }
340
+
341
+ .resizable-box-handle-s {
342
+ bottom: 0;
343
+ left: 0;
344
+ right: 0;
345
+ height: 8px;
346
+ cursor: s-resize;
347
+ }
348
+
349
+ .resizable-box-handle-se {
350
+ right: 0;
351
+ bottom: 0;
352
+ width: 16px;
353
+ height: 16px;
354
+ cursor: se-resize;
355
+
356
+ &::after {
357
+ content: "";
358
+ position: absolute;
359
+ right: 3px;
360
+ bottom: 3px;
361
+ width: 8px;
362
+ height: 8px;
363
+ border-right: 2px solid var(--gray-400);
364
+ border-bottom: 2px solid var(--gray-400);
365
+ }
366
+ }
367
+
368
+ .resizable-box-handle-w {
369
+ left: 0;
370
+ top: 0;
371
+ bottom: 0;
372
+ width: 8px;
373
+ cursor: w-resize;
374
+ }
375
+
376
+ .resizable-box-handle-n {
377
+ top: 0;
378
+ left: 0;
379
+ right: 0;
380
+ height: 8px;
381
+ cursor: n-resize;
382
+ }
383
+
384
+ .resizable-box-handle-nw {
385
+ left: 0;
386
+ top: 0;
387
+ width: 16px;
388
+ height: 16px;
389
+ cursor: nw-resize;
390
+ }
391
+
392
+ .resizable-box-handle-ne {
393
+ right: 0;
394
+ top: 0;
395
+ width: 16px;
396
+ height: 16px;
397
+ cursor: ne-resize;
398
+ }
399
+
400
+ .resizable-box-handle-sw {
401
+ left: 0;
402
+ bottom: 0;
403
+ width: 16px;
404
+ height: 16px;
405
+ cursor: sw-resize;
406
+ }
407
+
408
+ // ----------------------------------------
409
+ // Dark Mode
410
+ // ----------------------------------------
411
+ [data-theme="dark"] {
412
+ .resizable-handle {
413
+ background-color: var(--gray-700);
414
+
415
+ &:hover {
416
+ background-color: var(--primary);
417
+ }
418
+ }
419
+
420
+ .resizable-handle::before {
421
+ background-color: var(--gray-500);
422
+ }
423
+
424
+ .resizable-handle-bordered {
425
+ background-color: var(--gray-800);
426
+ border-color: var(--gray-700);
427
+ }
428
+
429
+ .resizable-handle-minimal:hover {
430
+ background-color: rgba($primary, 0.2);
431
+ }
432
+
433
+ .resizable-collapse-btn {
434
+ background-color: var(--gray-800);
435
+ border-color: var(--gray-600);
436
+
437
+ &:hover {
438
+ background-color: var(--gray-700);
439
+ }
440
+ }
441
+
442
+ .resizable-box-handle-se::after {
443
+ border-color: var(--gray-500);
444
+ }
445
+ }