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,420 @@
1
+ // ========================================
2
+ // ZenKit - Bottom Navigation Component
3
+ // ========================================
4
+
5
+ @use '../abstracts/variables' as *;
6
+
7
+ // ----------------------------------------
8
+ // Bottom Navigation Container
9
+ // ----------------------------------------
10
+ .bottom-nav {
11
+ position: fixed;
12
+ bottom: 0;
13
+ left: 0;
14
+ right: 0;
15
+ display: flex;
16
+ align-items: stretch;
17
+ justify-content: space-around;
18
+ background-color: var(--bg);
19
+ border-top: 1px solid var(--border);
20
+ z-index: 1000;
21
+ padding-bottom: env(safe-area-inset-bottom, 0);
22
+ }
23
+
24
+ // ----------------------------------------
25
+ // Bottom Navigation Item
26
+ // ----------------------------------------
27
+ .bottom-nav-item {
28
+ display: flex;
29
+ flex-direction: column;
30
+ align-items: center;
31
+ justify-content: center;
32
+ flex: 1;
33
+ min-width: 0;
34
+ padding: 0.5rem 0.25rem;
35
+ color: var(--text-muted);
36
+ text-decoration: none;
37
+ background: transparent;
38
+ border: none;
39
+ cursor: pointer;
40
+ transition: color $transition-fast $transition-timing;
41
+ -webkit-tap-highlight-color: transparent;
42
+
43
+ &:hover {
44
+ color: var(--text);
45
+ }
46
+
47
+ &:focus {
48
+ outline: none;
49
+ }
50
+
51
+ &:focus-visible {
52
+ outline: 2px solid var(--primary);
53
+ outline-offset: -2px;
54
+ }
55
+ }
56
+
57
+ .bottom-nav-item.active {
58
+ color: var(--primary);
59
+ }
60
+
61
+ // ----------------------------------------
62
+ // Bottom Navigation Icon
63
+ // ----------------------------------------
64
+ .bottom-nav-icon {
65
+ display: flex;
66
+ align-items: center;
67
+ justify-content: center;
68
+ width: 1.5rem;
69
+ height: 1.5rem;
70
+ margin-bottom: 0.125rem;
71
+ transition: transform $transition-fast $transition-timing;
72
+
73
+ svg {
74
+ width: 100%;
75
+ height: 100%;
76
+ }
77
+ }
78
+
79
+ .bottom-nav-item:active .bottom-nav-icon {
80
+ transform: scale(0.9);
81
+ }
82
+
83
+ .bottom-nav-item.active .bottom-nav-icon {
84
+ transform: scale(1.1);
85
+ }
86
+
87
+ // ----------------------------------------
88
+ // Bottom Navigation Label
89
+ // ----------------------------------------
90
+ .bottom-nav-label {
91
+ font-size: 0.625rem;
92
+ font-weight: $font-weight-medium;
93
+ white-space: nowrap;
94
+ overflow: hidden;
95
+ text-overflow: ellipsis;
96
+ max-width: 100%;
97
+ transition: opacity $transition-fast $transition-timing;
98
+ }
99
+
100
+ // ----------------------------------------
101
+ // Bottom Navigation Badge
102
+ // ----------------------------------------
103
+ .bottom-nav-badge {
104
+ position: absolute;
105
+ top: 0.25rem;
106
+ right: 50%;
107
+ transform: translateX(1rem);
108
+ min-width: 1rem;
109
+ height: 1rem;
110
+ padding: 0 0.25rem;
111
+ font-size: 0.625rem;
112
+ font-weight: $font-weight-semibold;
113
+ line-height: 1rem;
114
+ text-align: center;
115
+ color: var(--white);
116
+ background-color: var(--danger);
117
+ border-radius: 999px;
118
+ }
119
+
120
+ .bottom-nav-badge-dot {
121
+ min-width: 0.5rem;
122
+ height: 0.5rem;
123
+ padding: 0;
124
+ }
125
+
126
+ .bottom-nav-item {
127
+ position: relative;
128
+ }
129
+
130
+ // ----------------------------------------
131
+ // Bottom Navigation Variants
132
+ // ----------------------------------------
133
+
134
+ // Icons only (no labels)
135
+ .bottom-nav-icons-only {
136
+ .bottom-nav-label {
137
+ display: none;
138
+ }
139
+
140
+ .bottom-nav-icon {
141
+ width: 1.75rem;
142
+ height: 1.75rem;
143
+ margin-bottom: 0;
144
+ }
145
+ }
146
+
147
+ // Labels only when active
148
+ .bottom-nav-labels-active {
149
+ .bottom-nav-label {
150
+ opacity: 0;
151
+ height: 0;
152
+ margin: 0;
153
+ }
154
+
155
+ .bottom-nav-item.active .bottom-nav-label {
156
+ opacity: 1;
157
+ height: auto;
158
+ }
159
+ }
160
+
161
+ // Shifting (items shift on active)
162
+ .bottom-nav-shifting {
163
+ .bottom-nav-item {
164
+ flex: 1;
165
+ transition: flex $transition-base $transition-timing;
166
+ }
167
+
168
+ .bottom-nav-item.active {
169
+ flex: 1.5;
170
+ }
171
+
172
+ .bottom-nav-label {
173
+ opacity: 0;
174
+ max-width: 0;
175
+ }
176
+
177
+ .bottom-nav-item.active .bottom-nav-label {
178
+ opacity: 1;
179
+ max-width: 100%;
180
+ }
181
+ }
182
+
183
+ // ----------------------------------------
184
+ // Bottom Navigation Sizes
185
+ // ----------------------------------------
186
+ .bottom-nav-sm {
187
+ .bottom-nav-item {
188
+ padding: 0.375rem 0.25rem;
189
+ }
190
+
191
+ .bottom-nav-icon {
192
+ width: 1.25rem;
193
+ height: 1.25rem;
194
+ }
195
+
196
+ .bottom-nav-label {
197
+ font-size: 0.5625rem;
198
+ }
199
+ }
200
+
201
+ .bottom-nav-lg {
202
+ .bottom-nav-item {
203
+ padding: 0.75rem 0.5rem;
204
+ }
205
+
206
+ .bottom-nav-icon {
207
+ width: 1.75rem;
208
+ height: 1.75rem;
209
+ }
210
+
211
+ .bottom-nav-label {
212
+ font-size: 0.75rem;
213
+ }
214
+ }
215
+
216
+ // ----------------------------------------
217
+ // Bottom Navigation Indicator
218
+ // ----------------------------------------
219
+ .bottom-nav-indicator {
220
+ position: relative;
221
+ }
222
+
223
+ .bottom-nav-indicator .bottom-nav-item.active::before {
224
+ content: "";
225
+ position: absolute;
226
+ top: 0;
227
+ left: 50%;
228
+ transform: translateX(-50%);
229
+ width: 2rem;
230
+ height: 2px;
231
+ background-color: var(--primary);
232
+ border-radius: 0 0 2px 2px;
233
+ }
234
+
235
+ // Dot indicator
236
+ .bottom-nav-dot .bottom-nav-item.active::after {
237
+ content: "";
238
+ position: absolute;
239
+ bottom: 0.25rem;
240
+ left: 50%;
241
+ transform: translateX(-50%);
242
+ width: 4px;
243
+ height: 4px;
244
+ background-color: var(--primary);
245
+ border-radius: 50%;
246
+ }
247
+
248
+ // Background indicator
249
+ .bottom-nav-bg-indicator .bottom-nav-item.active {
250
+ background-color: var(--primary-50);
251
+ border-radius: $border-radius;
252
+ margin: 0.25rem;
253
+ padding: 0.375rem 0.5rem;
254
+ }
255
+
256
+ // ----------------------------------------
257
+ // Bottom Navigation with FAB
258
+ // ----------------------------------------
259
+ .bottom-nav-with-fab {
260
+ .bottom-nav-item:nth-child(3) {
261
+ visibility: hidden;
262
+ }
263
+ }
264
+
265
+ .bottom-nav-fab {
266
+ position: absolute;
267
+ top: -1.5rem;
268
+ left: 50%;
269
+ transform: translateX(-50%);
270
+ display: flex;
271
+ align-items: center;
272
+ justify-content: center;
273
+ width: 3.5rem;
274
+ height: 3.5rem;
275
+ background-color: var(--primary);
276
+ color: var(--white);
277
+ border: none;
278
+ border-radius: 50%;
279
+ cursor: pointer;
280
+ box-shadow: 0 4px 12px rgba($primary, 0.4);
281
+ transition: all $transition-base $transition-timing;
282
+
283
+ &:hover {
284
+ background-color: var(--primary-600);
285
+ transform: translateX(-50%) scale(1.05);
286
+ }
287
+
288
+ svg {
289
+ width: 1.5rem;
290
+ height: 1.5rem;
291
+ }
292
+ }
293
+
294
+ // ----------------------------------------
295
+ // Bottom Navigation Colors
296
+ // ----------------------------------------
297
+ .bottom-nav-primary {
298
+ background-color: var(--primary);
299
+ border-top-color: var(--primary-600);
300
+
301
+ .bottom-nav-item {
302
+ color: rgba(255, 255, 255, 0.7);
303
+
304
+ &:hover {
305
+ color: var(--white);
306
+ }
307
+
308
+ &.active {
309
+ color: var(--white);
310
+ }
311
+ }
312
+
313
+ .bottom-nav-indicator .bottom-nav-item.active::before {
314
+ background-color: var(--white);
315
+ }
316
+ }
317
+
318
+ .bottom-nav-dark {
319
+ background-color: var(--gray-900);
320
+ border-top-color: var(--gray-800);
321
+
322
+ .bottom-nav-item {
323
+ color: var(--gray-500);
324
+
325
+ &:hover {
326
+ color: var(--gray-300);
327
+ }
328
+
329
+ &.active {
330
+ color: var(--white);
331
+ }
332
+ }
333
+ }
334
+
335
+ // ----------------------------------------
336
+ // Bottom Navigation Shadow
337
+ // ----------------------------------------
338
+ .bottom-nav-shadow {
339
+ border-top: none;
340
+ box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
341
+ }
342
+
343
+ // ----------------------------------------
344
+ // Bottom Navigation Blur
345
+ // ----------------------------------------
346
+ .bottom-nav-blur {
347
+ background-color: rgba(255, 255, 255, 0.8);
348
+ backdrop-filter: blur(10px);
349
+ -webkit-backdrop-filter: blur(10px);
350
+ }
351
+
352
+ // ----------------------------------------
353
+ // Hide on Scroll (JS helper classes)
354
+ // ----------------------------------------
355
+ .bottom-nav-hide {
356
+ transform: translateY(100%);
357
+ transition: transform $transition-base $transition-timing;
358
+ }
359
+
360
+ .bottom-nav-show {
361
+ transform: translateY(0);
362
+ }
363
+
364
+ // ----------------------------------------
365
+ // Safe Area for Content
366
+ // ----------------------------------------
367
+ .has-bottom-nav {
368
+ padding-bottom: 4rem;
369
+ }
370
+
371
+ .has-bottom-nav-sm {
372
+ padding-bottom: 3.5rem;
373
+ }
374
+
375
+ .has-bottom-nav-lg {
376
+ padding-bottom: 5rem;
377
+ }
378
+
379
+ // ----------------------------------------
380
+ // Desktop Hide
381
+ // ----------------------------------------
382
+ @media (min-width: 768px) {
383
+ .bottom-nav-mobile-only {
384
+ display: none;
385
+ }
386
+ }
387
+
388
+ // ----------------------------------------
389
+ // Dark Mode
390
+ // ----------------------------------------
391
+ [data-theme="dark"] {
392
+ .bottom-nav {
393
+ background-color: var(--gray-900);
394
+ border-top-color: var(--gray-800);
395
+ }
396
+
397
+ .bottom-nav-item {
398
+ color: var(--gray-500);
399
+
400
+ &:hover {
401
+ color: var(--gray-300);
402
+ }
403
+
404
+ &.active {
405
+ color: var(--primary-300);
406
+ }
407
+ }
408
+
409
+ .bottom-nav-blur {
410
+ background-color: rgba(17, 24, 39, 0.8);
411
+ }
412
+
413
+ .bottom-nav-bg-indicator .bottom-nav-item.active {
414
+ background-color: rgba($primary, 0.2);
415
+ }
416
+
417
+ .bottom-nav-shadow {
418
+ box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
419
+ }
420
+ }