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