@mks2508/mks-ui 0.6.6 → 0.6.8

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/dist/index.css CHANGED
@@ -126,4 +126,704 @@
126
126
  html {
127
127
  @apply font-sans;
128
128
  }
129
- }
129
+ }/**
130
+ * TerminalSessionTabs Dropdown Styles.
131
+ *
132
+ * Uses CSS Anchor Positioning API for the "add container" dropdown.
133
+ * The + button acts as anchor, dropdown is positioned below it
134
+ * with automatic flip behavior at viewport edges.
135
+ *
136
+ * @module components/devenv/terminal/panel/terminal-session-tabs/styles
137
+ */
138
+
139
+ /* + button - acts as CSS anchor */
140
+ .addButton {
141
+ anchor-name: --session-tabs-add-anchor;
142
+ }
143
+
144
+ /* Container dropdown - anchored to + button */
145
+ .containerDropdown {
146
+ position-anchor: --session-tabs-add-anchor;
147
+ position: fixed;
148
+
149
+ /* Position below and left-aligned */
150
+ left: anchor(left);
151
+ top: anchor(bottom);
152
+ margin-top: 4px;
153
+
154
+ /* Flip to above if no room below */
155
+ position-try-fallbacks: flip-block, flip-inline;
156
+
157
+ min-width: 200px;
158
+ z-index: 50;
159
+
160
+ /* Hidden by default */
161
+ display: none;
162
+ opacity: 0;
163
+ transform: translateY(-4px);
164
+ transition: opacity 0.15s ease-out, transform 0.15s ease-out;
165
+ pointer-events: none;
166
+ }
167
+
168
+ .containerDropdown[data-open="true"] {
169
+ display: block;
170
+ opacity: 1;
171
+ transform: translateY(0);
172
+ pointer-events: auto;
173
+ }
174
+
175
+ /* Fallback for browsers without CSS Anchor Positioning */
176
+ @supports not (anchor-name: none) {
177
+ .containerDropdown {
178
+ position: absolute;
179
+ left: 0;
180
+ top: calc(100% + 4px);
181
+ z-index: 50;
182
+ }
183
+
184
+ .containerDropdown[data-open="true"] {
185
+ display: block;
186
+ }
187
+ }
188
+
189
+ /**
190
+ * TerminalFilterDropdown Styles.
191
+ *
192
+ * Uses CSS Anchor Positioning API for dropdown placement.
193
+ * Button acts as anchor, dropdown is positioned relative to it
194
+ * with automatic flip behavior at viewport edges.
195
+ *
196
+ * @module components/devenv/terminal/panel/terminal-filter-dropdown/styles
197
+ */
198
+
199
+ /* Trigger button - acts as CSS anchor */
200
+ .triggerButton {
201
+ anchor-name: --filter-dropdown-anchor;
202
+ }
203
+
204
+ /* Dropdown menu - anchored to trigger button */
205
+ .dropdownMenu {
206
+ position-anchor: --filter-dropdown-anchor;
207
+ position: fixed;
208
+
209
+ /* Position below and left-aligned */
210
+ left: anchor(left);
211
+ top: anchor(bottom);
212
+ margin-top: 4px;
213
+
214
+ /* Flip to above if no room below */
215
+ position-try-fallbacks: flip-block, flip-inline;
216
+
217
+ min-width: 180px;
218
+ z-index: 50;
219
+
220
+ /* Hidden by default */
221
+ display: none;
222
+ opacity: 0;
223
+ transform: translateY(-4px);
224
+ transition: opacity 0.15s ease-out, transform 0.15s ease-out;
225
+ pointer-events: none;
226
+ }
227
+
228
+ .dropdownMenu[data-open="true"] {
229
+ display: block;
230
+ opacity: 1;
231
+ transform: translateY(0);
232
+ pointer-events: auto;
233
+ }
234
+
235
+ /* Fallback for browsers without CSS Anchor Positioning */
236
+ @supports not (anchor-name: none) {
237
+ .dropdownMenu {
238
+ position: absolute;
239
+ left: 0;
240
+ top: calc(100% + 4px);
241
+ z-index: 50;
242
+ }
243
+
244
+ .dropdownMenu[data-open="true"] {
245
+ display: block;
246
+ }
247
+ }
248
+
249
+ /**
250
+ * Tabs CSS Anchor Positioning.
251
+ *
252
+ * Zero-JS position tracking for the sliding indicator using CSS Anchor API.
253
+ * The indicator automatically follows the active tab via anchor positioning.
254
+ */
255
+
256
+ /* Scope anchors per Tabs instance */
257
+ [data-slot="tabs-list"] {
258
+ anchor-scope: --tabs-active;
259
+ }
260
+
261
+ /* Active tab becomes the anchor */
262
+ [data-slot="tabs-tab"][data-active] {
263
+ anchor-name: --tabs-active;
264
+ }
265
+
266
+ /* Indicator follows the active anchor */
267
+ [data-slot="tabs-indicator"] {
268
+ position-anchor: --tabs-active;
269
+ left: anchor(left);
270
+ right: anchor(right);
271
+ transition:
272
+ top 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
273
+ left 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
274
+ right 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
275
+ bottom 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
276
+ width 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
277
+ height 200ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
278
+ }
279
+
280
+ /* Respect reduced motion preference */
281
+ @media (prefers-reduced-motion: reduce) {
282
+ [data-slot="tabs-indicator"] {
283
+ transition-duration: 0ms;
284
+ }
285
+ }
286
+
287
+ /**
288
+ * DynamicToggle v2 — CSS state transitions.
289
+ *
290
+ * Rules requiring :has(), container queries, clip-path, or pseudo-elements.
291
+ * Layout, colors, sizing in Tailwind (DynamicToggle.styles.ts).
292
+ *
293
+ * @import '@mks2508/mks-ui/react/ui/DynamicToggle/DynamicToggle.module.css';
294
+ */
295
+
296
+ /* ── Variables ── */
297
+ [data-slot="dt-root"] {
298
+ --dt-dur: 0.22s;
299
+ --dt-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
300
+ --dt-fade: 0.45;
301
+ --dt-indicator-dur: 0.3s;
302
+ --dt-indicator-ease: cubic-bezier(0.4, 0, 0.2, 1);
303
+ }
304
+
305
+ /* ── Track: explicit row prevents h-full items from overflowing container ── */
306
+ [data-slot="dt-root"] [data-slot="dt-track"] {
307
+ grid-template-rows: minmax(0, 1fr);
308
+ }
309
+
310
+ /* ── Top-level option spans 2 grid cols ── */
311
+ [data-slot="dt-root"] [data-slot="dt-track"] > label {
312
+ grid-column: span 2;
313
+ }
314
+
315
+ /* ── Primary option text ── */
316
+ [data-slot="dt-root"] [data-slot="dt-track"]:has(> input:checked) > label {
317
+ color: var(--accent-foreground);
318
+ z-index: 2;
319
+ }
320
+ [data-slot="dt-root"] [data-slot="dt-track"]:not(:has(> input:checked)) > label {
321
+ color: var(--foreground);
322
+ opacity: var(--dt-fade);
323
+ }
324
+
325
+ /* ── Group: container queries ── */
326
+ [data-slot="dt-root"] [data-slot="dt-group"] {
327
+ container-type: size;
328
+ overflow: hidden;
329
+ }
330
+
331
+ /* ══════════════════════════════════════════════════════════
332
+ * INDICATOR POSITIONING
333
+ *
334
+ * Modern: CSS Anchor Positioning — indicator follows active option
335
+ * Fallback: translate-based positioning for older browsers
336
+ * ══════════════════════════════════════════════════════════ */
337
+
338
+ /* ── Anchor-based indicator (requires full anchor API) ── */
339
+ @supports (anchor-scope: all) {
340
+ /* Scope anchors per toggle instance */
341
+ [data-slot="dt-root"]:not([data-indicator="translate"]) {
342
+ anchor-scope: --dt-active;
343
+ }
344
+
345
+ /* Active option becomes the anchor via native :checked */
346
+ [data-slot="dt-root"]:not([data-indicator="translate"]) [data-slot="dt-track"] > label:has(+ input:checked) {
347
+ anchor-name: --dt-active;
348
+ }
349
+ [data-slot="dt-root"]:not([data-indicator="translate"]) [data-slot="dt-group"] > label:has(+ input:checked) {
350
+ anchor-name: --dt-active;
351
+ }
352
+
353
+ /* Single unified indicator: morphs from full-width to half-width */
354
+ [data-slot="dt-root"]:not([data-indicator="translate"]) [data-slot="dt-indicator"] {
355
+ position-anchor: --dt-active;
356
+ top: anchor(top);
357
+ right: anchor(right);
358
+ bottom: anchor(bottom);
359
+ left: anchor(left);
360
+ translate: none;
361
+ width: auto;
362
+ transition:
363
+ top var(--dt-indicator-dur) var(--dt-indicator-ease),
364
+ right var(--dt-indicator-dur) var(--dt-indicator-ease),
365
+ bottom var(--dt-indicator-dur) var(--dt-indicator-ease),
366
+ left var(--dt-indicator-dur) var(--dt-indicator-ease);
367
+ }
368
+
369
+ /* Hide the group indicator — unified indicator handles everything */
370
+ [data-slot="dt-root"]:not([data-indicator="translate"]) [data-slot="dt-group-indicator"] {
371
+ display: none;
372
+ }
373
+ }
374
+
375
+ /* ── Inset-based fallback (older browsers) — same morph as anchor but hardcoded ── */
376
+ @supports not (anchor-scope: all) {
377
+ /* Unified indicator: left/right transition morphs width + position */
378
+ [data-slot="dt-root"] [data-slot="dt-indicator"] {
379
+ left: 50%;
380
+ right: 0;
381
+ width: auto;
382
+ translate: none;
383
+ transition:
384
+ left var(--dt-indicator-dur) var(--dt-indicator-ease),
385
+ right var(--dt-indicator-dur) var(--dt-indicator-ease);
386
+ }
387
+ /* Top-level checked: indicator covers left half */
388
+ [data-slot="dt-root"] [data-slot="dt-track"]:has(> input:checked) [data-slot="dt-indicator"] {
389
+ left: 0;
390
+ right: 50%;
391
+ }
392
+ /* Group option 1 checked: indicator at 3rd quarter */
393
+ [data-slot="dt-root"] [data-slot="dt-group"]:has(input:nth-of-type(1):checked) ~ [data-slot="dt-indicator"],
394
+ [data-slot="dt-root"] [data-slot="dt-track"]:has([data-slot="dt-group"] input:nth-of-type(1):checked) [data-slot="dt-indicator"] {
395
+ left: 50%;
396
+ right: 25%;
397
+ }
398
+ /* Group option 2 checked: indicator at 4th quarter */
399
+ [data-slot="dt-root"] [data-slot="dt-group"]:has(input:nth-of-type(2):checked) ~ [data-slot="dt-indicator"],
400
+ [data-slot="dt-root"] [data-slot="dt-track"]:has([data-slot="dt-group"] input:nth-of-type(2):checked) [data-slot="dt-indicator"] {
401
+ left: 75%;
402
+ right: 0;
403
+ }
404
+ /* Hide group indicator — unified indicator handles everything */
405
+ [data-slot="dt-root"] [data-slot="dt-group-indicator"] {
406
+ display: none;
407
+ }
408
+ }
409
+
410
+ /* ── Force inset mode via data-indicator="translate" (works regardless of @supports) ── */
411
+ [data-slot="dt-root"][data-indicator="translate"] [data-slot="dt-indicator"] {
412
+ left: 50%;
413
+ right: 0;
414
+ width: auto;
415
+ translate: none;
416
+ transition:
417
+ left var(--dt-indicator-dur) var(--dt-indicator-ease),
418
+ right var(--dt-indicator-dur) var(--dt-indicator-ease);
419
+ }
420
+ [data-slot="dt-root"][data-indicator="translate"] [data-slot="dt-track"]:has(> input:checked) [data-slot="dt-indicator"] {
421
+ left: 0;
422
+ right: 50%;
423
+ }
424
+ [data-slot="dt-root"][data-indicator="translate"] [data-slot="dt-track"]:has([data-slot="dt-group"] input:nth-of-type(1):checked) [data-slot="dt-indicator"] {
425
+ left: 50%;
426
+ right: 25%;
427
+ }
428
+ [data-slot="dt-root"][data-indicator="translate"] [data-slot="dt-track"]:has([data-slot="dt-group"] input:nth-of-type(2):checked) [data-slot="dt-indicator"] {
429
+ left: 75%;
430
+ right: 0;
431
+ }
432
+ [data-slot="dt-root"][data-indicator="translate"] [data-slot="dt-group-indicator"] {
433
+ display: none;
434
+ }
435
+
436
+ /* ══════════════════════════════════════════════════════════
437
+ * GROUP COLLAPSED STATE
438
+ *
439
+ * ::before = title text (via data-label attr)
440
+ * ::after = combined opts text (via data-opts attr)
441
+ * <label>s = controlled by data-collapsed mode
442
+ *
443
+ * 3 modes: title | opts | title-opts (default)
444
+ * ══════════════════════════════════════════════════════════ */
445
+
446
+ /* ── ::before — group title ── */
447
+ [data-slot="dt-group"]::before {
448
+ content: attr(data-label);
449
+ position: absolute;
450
+ left: 50%;
451
+ top: 50%;
452
+ translate: -50% -80%;
453
+ color: var(--foreground);
454
+ font-size: inherit;
455
+ font-weight: 500;
456
+ z-index: 2;
457
+ white-space: nowrap;
458
+ pointer-events: none;
459
+ transition:
460
+ scale var(--dt-dur) var(--dt-ease),
461
+ translate var(--dt-dur) var(--dt-ease),
462
+ opacity var(--dt-dur) var(--dt-ease);
463
+ }
464
+
465
+ /* ── ::after — combined opts text ── */
466
+ [data-slot="dt-group"]::after {
467
+ content: attr(data-opts);
468
+ position: absolute;
469
+ left: 50%;
470
+ top: 50%;
471
+ translate: -50% 20%;
472
+ color: var(--muted-foreground);
473
+ font-size: 0.85em;
474
+ opacity: 0.6;
475
+ z-index: 2;
476
+ white-space: nowrap;
477
+ pointer-events: none;
478
+ transition: opacity var(--dt-dur) var(--dt-ease);
479
+ }
480
+ [data-slot="dt-group"]:not([data-opts])::after {
481
+ content: none;
482
+ }
483
+
484
+ /* ── Group labels — transition props ── */
485
+ [data-slot="dt-root"] [data-slot="dt-group"] label {
486
+ color: var(--muted-foreground);
487
+ cursor: pointer;
488
+ z-index: 2;
489
+ transition:
490
+ color var(--dt-dur) var(--dt-ease),
491
+ opacity var(--dt-dur) var(--dt-ease),
492
+ translate var(--dt-dur) var(--dt-ease);
493
+ }
494
+ [data-slot="dt-root"] [data-slot="dt-group"] label span {
495
+ display: grid;
496
+ place-items: center;
497
+ height: 100%;
498
+ width: 100%;
499
+ border-radius: var(--dt-radius, 9999px);
500
+ transition: scale var(--dt-dur) var(--dt-ease);
501
+ }
502
+
503
+ /* ── Collapsed mode: "title" — only ::before, labels slide+scale out ── */
504
+ [data-slot="dt-group"][data-collapsed="title"]::before {
505
+ translate: -50% -50%;
506
+ }
507
+ [data-slot="dt-group"][data-collapsed="title"]::after {
508
+ display: none;
509
+ }
510
+ [data-slot="dt-group"][data-collapsed="title"]:not(:has(input:checked)) label {
511
+ opacity: 0;
512
+ translate: 0 30%;
513
+ }
514
+ [data-slot="dt-group"][data-collapsed="title"]:not(:has(input:checked)) label span {
515
+ scale: 0.5;
516
+ }
517
+
518
+ /* ── Collapsed mode: "opts" — only ::after, labels slide+scale out ── */
519
+ [data-slot="dt-group"][data-collapsed="opts"]::before {
520
+ display: none;
521
+ }
522
+ [data-slot="dt-group"][data-collapsed="opts"]::after {
523
+ translate: -50% -50%;
524
+ font-size: inherit;
525
+ opacity: 0.7;
526
+ }
527
+ [data-slot="dt-group"][data-collapsed="opts"]:not(:has(input:checked)) label {
528
+ opacity: 0;
529
+ translate: 0 30%;
530
+ }
531
+ [data-slot="dt-group"][data-collapsed="opts"]:not(:has(input:checked)) label span {
532
+ scale: 0.5;
533
+ }
534
+
535
+ /* ── Collapsed mode: "title-opts" — WIP: disabled, falls back to "title" behavior ── */
536
+ /* TODO: title-opts needs a redesign — title (::before) and scaled labels overlap
537
+ at all container sizes. The codepen original morph relied on specific dimensions
538
+ that don't translate to the component's size variants. Needs a different approach
539
+ (e.g., crossfade, flex layout, or JS-measured positions). */
540
+ [data-slot="dt-group"][data-collapsed="title-opts"]::after {
541
+ content: none;
542
+ }
543
+ [data-slot="dt-group"][data-collapsed="title-opts"]::before {
544
+ translate: -50% -50%;
545
+ }
546
+ [data-slot="dt-group"][data-collapsed="title-opts"]:not(:has(input:checked)) label {
547
+ opacity: 0;
548
+ translate: 0 30%;
549
+ }
550
+
551
+ /* ── When group expanded ── */
552
+ [data-slot="dt-group"]:has(input:checked)::before {
553
+ translate: -50% -250%;
554
+ scale: 0.85;
555
+ }
556
+ [data-slot="dt-group"]:has(input:checked)::after {
557
+ opacity: 0;
558
+ }
559
+ [data-slot="dt-group"]:has(input:checked) label {
560
+ opacity: 0.75;
561
+ color: var(--muted-foreground);
562
+ translate: 0 0;
563
+ }
564
+ [data-slot="dt-group"]:has(input:checked) label span {
565
+ scale: 1;
566
+ }
567
+ [data-slot="dt-group"]:has(input:nth-of-type(1):checked) label:nth-of-type(1),
568
+ [data-slot="dt-group"]:has(input:nth-of-type(2):checked) label:nth-of-type(2) {
569
+ color: var(--foreground);
570
+ opacity: 1;
571
+ }
572
+
573
+ /* ══════════════════════════════════════════════════════════
574
+ * GROUP LABEL / BUBBLE (above or below the pill)
575
+ *
576
+ * Positioned via CSS. In filter/path morph modes, rendered with GooeyCanvas.
577
+ * In none mode, simple CSS-driven show/hide.
578
+ * bubblePosition: top | bottom (no left/right in v2)
579
+ * ══════════════════════════════════════════════════════════ */
580
+
581
+ [data-slot="dt-group-label"] {
582
+ display: grid;
583
+ grid-template-rows: 0fr;
584
+ left: 20%;
585
+ right: 20%;
586
+ transition:
587
+ grid-template-rows calc(var(--dt-dur) * 1.5) var(--dt-ease),
588
+ opacity var(--dt-dur) var(--dt-ease);
589
+ opacity: 0;
590
+ background: var(--card);
591
+ border: 1px solid var(--border);
592
+ z-index: 3;
593
+ transform: translateZ(0);
594
+ -webkit-transform: translateZ(0);
595
+ }
596
+ [data-slot="dt-group-label"] > span {
597
+ overflow: hidden;
598
+ min-height: 0;
599
+ display: flex;
600
+ align-items: center;
601
+ justify-content: center;
602
+ padding: 0 0.75em;
603
+ height: calc(var(--dt-h, 38px) * 0.4);
604
+ box-sizing: border-box;
605
+ }
606
+
607
+ /* Top position */
608
+ [data-slot="dt-group-label"][data-bubble-position="top"] {
609
+ bottom: 100%;
610
+ border-radius: calc(var(--dt-h, 38px) * 0.2) calc(var(--dt-h, 38px) * 0.2) 0 0;
611
+ border-bottom: none;
612
+ margin-bottom: -1px;
613
+ }
614
+
615
+ /* Bottom position */
616
+ [data-slot="dt-group-label"][data-bubble-position="bottom"] {
617
+ top: 100%;
618
+ border-radius: 0 0 calc(var(--dt-h, 38px) * 0.2) calc(var(--dt-h, 38px) * 0.2);
619
+ border-top: none;
620
+ margin-top: -1px;
621
+ }
622
+
623
+ /* When group active → group label grows (vertical: top/bottom) */
624
+ [data-slot="dt-root"]:not(:has([data-slot="dt-track"] > input:checked)) [data-slot="dt-group-label"][data-bubble-position="top"],
625
+ [data-slot="dt-root"]:not(:has([data-slot="dt-track"] > input:checked)) [data-slot="dt-group-label"][data-bubble-position="bottom"] {
626
+ grid-template-rows: 1fr;
627
+ opacity: 1;
628
+ }
629
+ [data-slot="dt-root"]:not(:has([data-slot="dt-track"] > input:checked)) [data-slot="dt-group-label"][data-bubble-position="top"] > span,
630
+ [data-slot="dt-root"]:not(:has([data-slot="dt-track"] > input:checked)) [data-slot="dt-group-label"][data-bubble-position="bottom"] > span {
631
+ padding: 0.35em 0.75em;
632
+ }
633
+
634
+ /* ── Filter morph mode ── */
635
+ [data-slot="dt-root"][data-morph="filter"] [data-slot="dt-group-label"] {
636
+ border: none;
637
+ }
638
+ [data-slot="dt-root"][data-morph="filter"] [data-slot="dt-track"] {
639
+ position: relative;
640
+ z-index: 1;
641
+ }
642
+
643
+ /* ── Filter morph: ::before hides on expand, gooey canvas handles junction ── */
644
+ [data-slot="dt-root"][data-morph="filter"] [data-slot="dt-group"]:has(input:checked)::before {
645
+ opacity: 0;
646
+ translate: -50% -80%;
647
+ scale: 1;
648
+ }
649
+
650
+ /* ── Path morph mode ── */
651
+ [data-slot="dt-root"][data-morph="path"] [data-slot="dt-track"] {
652
+ position: relative;
653
+ z-index: 1;
654
+ }
655
+
656
+ /**
657
+ * View Transitions API - Default transition styles.
658
+ *
659
+ * These styles apply to all view-transition pseudo-elements by default,
660
+ * eliminating the need for dynamic style injection based on transition names.
661
+ *
662
+ * Usage: Apply `view-transition-name` via inline style or CSS variable:
663
+ * <div style={{ viewTransitionName: 'hero' }}>...</div>
664
+ *
665
+ * Or via CSS:
666
+ * .my-element { view-transition-name: hero; }
667
+ */
668
+
669
+ /* Default animation for all view transitions */
670
+ ::view-transition-old(*),
671
+ ::view-transition-new(*) {
672
+ animation-duration: 300ms;
673
+ animation-timing-function: ease-out;
674
+ }
675
+
676
+ /* CSS Variables for anchor positioning */
677
+ .morphingPopoverContainer {
678
+ position: relative;
679
+ display: inline-block;
680
+ --anchor-name: morphing-trigger;
681
+ --target-width: 220px;
682
+ --target-height: 120px;
683
+ --transition-duration: 0.2s;
684
+ }
685
+
686
+ /* Trigger button styles */
687
+ .morphingTrigger {
688
+ anchor-name: var(--anchor-name);
689
+ width: 44px;
690
+ aspect-ratio: 1;
691
+ border-radius: 50%;
692
+ display: grid;
693
+ place-items: center;
694
+ font-size: 24px;
695
+ cursor: pointer;
696
+ border: none;
697
+ background: transparent;
698
+ transition: background-color 0.2s;
699
+ }
700
+
701
+ .morphingTrigger:hover {
702
+ background-color: hsl(var(--muted) / 0.5);
703
+ }
704
+
705
+ /* Popover styles - anchored to trigger by default */
706
+ .morphingPopover {
707
+ position-anchor: var(--anchor-name);
708
+ left: anchor(left);
709
+ top: anchor(top);
710
+ width: anchor-size(width);
711
+ min-height: 0;
712
+ border-radius: 50%;
713
+ overflow: hidden;
714
+ padding: 0;
715
+ height: anchor-size(height);
716
+ transition-behavior: allow-discrete;
717
+ transition-property: display, overlay, width, height, top,
718
+ border-radius, left, position-anchor, transform, opacity;
719
+ transition-duration: var(--transition-duration);
720
+ transition-timing-function: ease-out;
721
+ transform-origin: center center;
722
+ opacity: 0;
723
+ }
724
+
725
+ /* When popover is open - expand to target size */
726
+ .morphingPopover:popover-open {
727
+ position-anchor: fixed;
728
+ left: 50%;
729
+ top: 50%;
730
+ transform: translate(-50%, -50%);
731
+ width: var(--target-width);
732
+ height: var(--target-height);
733
+ border-radius: 12px;
734
+ opacity: 1;
735
+ border: 1px solid hsl(var(--border));
736
+ background: hsl(var(--background));
737
+ box-shadow: 0 10px 40px -10px hsl(var(--foreground) / 0.3);
738
+ }
739
+
740
+ /* Starting style for animation - browser support required */
741
+ @starting-style {
742
+ .morphingPopover:popover-open {
743
+ position-anchor: var(--anchor-name);
744
+ left: anchor(left);
745
+ top: anchor(top);
746
+ transform: none;
747
+ border-radius: 50%;
748
+ width: anchor-size(width);
749
+ height: anchor-size(height);
750
+ opacity: 0;
751
+ }
752
+ }
753
+
754
+ /* Fallback for browsers without anchor positioning */
755
+ @supports not (anchor-name: none) {
756
+ .morphingPopover {
757
+ position: fixed;
758
+ left: 50%;
759
+ top: 50%;
760
+ transform: translate(-50%, -50%) scale(0.8);
761
+ opacity: 0;
762
+ pointer-events: none;
763
+ }
764
+
765
+ .morphingPopover:popover-open {
766
+ transform: translate(-50%, -50%) scale(1);
767
+ opacity: 1;
768
+ pointer-events: auto;
769
+ }
770
+
771
+ @starting-style {
772
+ .morphingPopover:popover-open {
773
+ transform: translate(-50%, -50%) scale(0.8);
774
+ opacity: 0;
775
+ }
776
+ }
777
+ }
778
+
779
+ /* Variant: Morphing to a specific target element */
780
+ .morphingPopoverTargetContainer {
781
+ position: relative;
782
+ display: inline-block;
783
+ --anchor-name: morphing-trigger;
784
+ --target-anchor-name: morphing-target;
785
+ --transition-duration: 0.2s;
786
+ }
787
+
788
+ .morphingPopoverTarget {
789
+ position-anchor: var(--anchor-name);
790
+ left: anchor(left);
791
+ top: anchor(top);
792
+ width: anchor-size(width);
793
+ min-height: 0;
794
+ border-radius: 50%;
795
+ overflow: hidden;
796
+ padding: 0;
797
+ height: anchor-size(height);
798
+ transition-behavior: allow-discrete;
799
+ transition-property: display, overlay, width, height, top,
800
+ border-radius, left, position-anchor, transform, opacity;
801
+ transition-duration: var(--transition-duration);
802
+ transition-timing-function: ease-out;
803
+ }
804
+
805
+ .morphingPopoverTarget:popover-open {
806
+ position-anchor: var(--target-anchor-name);
807
+ left: anchor(left);
808
+ top: anchor(top);
809
+ border-radius: 12px;
810
+ min-width: 200px;
811
+ min-height: 120px;
812
+ border: 1px solid hsl(var(--border));
813
+ background: hsl(var(--background));
814
+ box-shadow: 0 10px 40px -10px hsl(var(--foreground) / 0.3);
815
+ opacity: 1;
816
+ }
817
+
818
+ @starting-style {
819
+ .morphingPopoverTarget:popover-open {
820
+ position-anchor: var(--anchor-name);
821
+ left: anchor(left);
822
+ top: anchor(top);
823
+ border-radius: 50%;
824
+ width: anchor-size(width);
825
+ height: anchor-size(height);
826
+ opacity: 0;
827
+ }
828
+ }
829
+
@@ -1,4 +1,4 @@
1
- import './DynamicToggle.module.css';
1
+ import './DynamicToggle.css';
2
2
  import { dynamicToggleVariants } from './DynamicToggle.styles';
3
3
  import type { DynamicToggleContextType, IDynamicToggleProps, IDynamicToggleOptionProps, IDynamicToggleGroupProps } from './DynamicToggle.types';
4
4
  declare const useDynamicToggle: () => DynamicToggleContextType;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react-ui/ui/DynamicToggle/index.tsx"],"names":[],"mappings":"AA8BA,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAuB,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AACpF,OAAO,KAAK,EACV,wBAAwB,EAIxB,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACzB,MAAM,uBAAuB,CAAC;AAM/B,QAAA,MAA8B,gBAAgB,gCACsB,CAAC;AAmCrE;;GAE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AAyB,EAAE,MAAM,wBAAwB,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC"}
@@ -4,7 +4,7 @@ import { cn } from "../../lib/utils.js";
4
4
  import { GooeyCanvas } from "../../primitives/waapi/Gooey/GooeyCanvas.js";
5
5
  import { getStrictContext } from "../../lib/get-strict-context.js";
6
6
  import { useControlledState } from "../../hooks/State/UseControlledState.js";
7
- import "./DynamicToggle.module.js";
7
+ import "./DynamicToggle.js";
8
8
  import { dynamicToggleStyles, dynamicToggleVariants } from "./DynamicToggle.styles.js";
9
9
  import * as React$1 from "react";
10
10
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
@@ -1,5 +1,5 @@
1
1
  import { tabsListVariants, tabsTabVariants, tabsIndicatorVariants } from './Tabs.styles';
2
- import './Tabs.module.css';
2
+ import './Tabs.css';
3
3
  import type { ITabsProps, ITabsHighlightProps, ITabsHighlightItemProps, ITabsListProps, ITabsTabProps, ITabsPanelProps, ITabsPanelsProps } from './Tabs.types';
4
4
  /**
5
5
  * Root Tabs component -- provides active tab value context and
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/react-ui/ui/Tabs/index.tsx"],"names":[],"mappings":"AAoEA,OAAO,EAEL,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACtB,MAAM,eAAe,CAAC;AACvB,OAAO,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAEV,UAAU,EACV,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,aAAa,EACb,eAAe,EACf,gBAAgB,EAEjB,MAAM,cAAc,CAAC;AAqBtB;;;;;;;;;;;;;;;;;GAiBG;AACH,iBAAS,IAAI,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAiB/D;AAMD;;;;;;;;;;;;;;;;;GAiBG;AACH,iBAAS,aAAa,CAAC,EACrB,UAA4D,EAC5D,KAAK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ACjB,QAAQ,EACR,OAAO,EACP,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,qBAAqB,GACtB,CAAC;AAGF,YAAY,EACV,UAAU,EACV,mBAAmB,EACnB,uBAAuB,EACvB,cAAc,EACd,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,oBAAoB,EACpB,sBAAsB,EACtB,WAAW,EACX,eAAe,GAChB,MAAM,cAAc,CAAC;AAEtB,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
@@ -6,7 +6,7 @@ import { AutoHeight } from "../../primitives/AutoHeight/index.js";
6
6
  import { getStrictContext } from "../../lib/get-strict-context.js";
7
7
  import { useControlledState } from "../../hooks/State/UseControlledState.js";
8
8
  import { tabsIndicatorVariants, tabsListVariants, tabsStyles, tabsTabVariants } from "./Tabs.styles.js";
9
- import "./Tabs.module.js";
9
+ import "./Tabs.js";
10
10
  import * as React$1 from "react";
11
11
  import { AnimatePresence, motion } from "motion/react";
12
12
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -196,6 +196,7 @@ function TabsList({ variant, size, indicator, slots, className, children, ...pro
196
196
  function TabsHighlightItem({ slots, ...props }) {
197
197
  return /* @__PURE__ */ jsx(HighlightItem, {
198
198
  "data-slot": "tabs-highlight-item",
199
+ asChild: true,
199
200
  ...props
200
201
  });
201
202
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mks2508/mks-ui",
3
- "version": "0.6.6",
3
+ "version": "0.6.8",
4
4
  "description": "UI component library - Shadcn/Animate UI based with DevEnv components",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -82,14 +82,17 @@
82
82
  "import": "./dist/react-ui/blocks/Terminal/display.js",
83
83
  "default": "./dist/react-ui/blocks/Terminal/display.js"
84
84
  },
85
- "./index.css": "./dist/index.css"
85
+ "./index.css": {
86
+ "style": "./dist/index.css"
87
+ }
86
88
  },
87
89
  "files": [
88
90
  "dist"
89
91
  ],
90
92
  "scripts": {
91
93
  "dev": "vite",
92
- "build": "rm -rf dist && bunx rolldown --config rolldown.config.ts && bunx tsc --emitDeclarationOnly && bunx tsc-alias && cp src/index.css dist/index.css",
94
+ "build": "rm -rf dist && bunx rolldown --config rolldown.config.ts && bunx tsc --emitDeclarationOnly && bunx tsc-alias && cp src/index.css dist/index.css && bun run build:css",
95
+ "build:css": "find dist -name '*.css' ! -name 'index.css' -type f -exec cat {} \\; >> dist/index.css",
93
96
  "typecheck": "bunx tsc --noEmit",
94
97
  "lint": "bunx oxlint .",
95
98
  "preview": "vite preview",