@kushagradhawan/kookie-ui 0.1.53 → 0.1.55
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/components.css +292 -187
- package/dist/cjs/components/_internal/shell-bottom.js.map +2 -2
- package/dist/cjs/components/_internal/shell-handles.js +1 -1
- package/dist/cjs/components/_internal/shell-handles.js.map +3 -3
- package/dist/cjs/components/_internal/shell-inspector.js.map +2 -2
- package/dist/cjs/components/_internal/shell-sidebar.d.ts.map +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js +1 -1
- package/dist/cjs/components/_internal/shell-sidebar.js.map +2 -2
- package/dist/cjs/components/chatbar.d.ts.map +1 -1
- package/dist/cjs/components/chatbar.js +1 -1
- package/dist/cjs/components/chatbar.js.map +3 -3
- package/dist/cjs/components/shell.hooks.js +1 -1
- package/dist/cjs/components/shell.hooks.js.map +2 -2
- package/dist/cjs/components/shell.js +1 -1
- package/dist/cjs/components/shell.js.map +3 -3
- package/dist/cjs/components/shell.types.d.ts +2 -2
- package/dist/cjs/components/shell.types.d.ts.map +1 -1
- package/dist/cjs/components/shell.types.js +1 -1
- package/dist/cjs/components/shell.types.js.map +3 -3
- package/dist/esm/components/_internal/shell-bottom.js.map +2 -2
- package/dist/esm/components/_internal/shell-handles.js +1 -1
- package/dist/esm/components/_internal/shell-handles.js.map +3 -3
- package/dist/esm/components/_internal/shell-inspector.js.map +2 -2
- package/dist/esm/components/_internal/shell-sidebar.d.ts.map +1 -1
- package/dist/esm/components/_internal/shell-sidebar.js +1 -1
- package/dist/esm/components/_internal/shell-sidebar.js.map +2 -2
- package/dist/esm/components/chatbar.d.ts.map +1 -1
- package/dist/esm/components/chatbar.js +1 -1
- package/dist/esm/components/chatbar.js.map +3 -3
- package/dist/esm/components/shell.hooks.js +1 -1
- package/dist/esm/components/shell.hooks.js.map +3 -3
- package/dist/esm/components/shell.js +1 -1
- package/dist/esm/components/shell.js.map +3 -3
- package/dist/esm/components/shell.types.d.ts +2 -2
- package/dist/esm/components/shell.types.d.ts.map +1 -1
- package/dist/esm/components/shell.types.js +1 -1
- package/dist/esm/components/shell.types.js.map +3 -3
- package/package.json +1 -1
- package/schemas/base-button.json +1 -1
- package/schemas/button.json +1 -1
- package/schemas/icon-button.json +1 -1
- package/schemas/index.json +6 -6
- package/schemas/toggle-button.json +1 -1
- package/schemas/toggle-icon-button.json +1 -1
- package/src/components/_internal/base-card.css +20 -83
- package/src/components/_internal/base-sidebar.css +2 -19
- package/src/components/_internal/shell-bottom.tsx +1 -1
- package/src/components/_internal/shell-handles.tsx +1 -1
- package/src/components/_internal/shell-inspector.tsx +1 -1
- package/src/components/_internal/shell-sidebar.tsx +2 -2
- package/src/components/callout.css +22 -5
- package/src/components/chatbar.tsx +7 -5
- package/src/components/shell.hooks.ts +3 -3
- package/src/components/shell.tsx +14 -14
- package/src/components/shell.types.ts +2 -2
- package/src/components/table.css +25 -5
- package/styles.css +292 -187
|
@@ -64,8 +64,9 @@
|
|
|
64
64
|
z-index: -1;
|
|
65
65
|
|
|
66
66
|
/* Theme-level translucent override */
|
|
67
|
-
:where([data-panel-background='translucent']) & {
|
|
67
|
+
:where([data-panel-background='translucent'], [data-material='translucent']) & {
|
|
68
68
|
backdrop-filter: var(--backdrop-filter-panel);
|
|
69
|
+
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
/* Component-level overrides (higher specificity) */
|
|
@@ -78,22 +79,6 @@
|
|
|
78
79
|
backdrop-filter: var(--backdrop-filter-panel);
|
|
79
80
|
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
80
81
|
}
|
|
81
|
-
|
|
82
|
-
/* Disable backdrop-filter when inside elements that already have backdrop-filter */
|
|
83
|
-
:where(
|
|
84
|
-
.rt-PopoverContent,
|
|
85
|
-
.rt-BaseDialogContent,
|
|
86
|
-
.rt-BaseMenuContent,
|
|
87
|
-
.rt-DropdownMenuContent,
|
|
88
|
-
.rt-ContextMenuContent,
|
|
89
|
-
.rt-AlertDialogContent,
|
|
90
|
-
.rt-HoverCardContent,
|
|
91
|
-
.rt-TooltipContent,
|
|
92
|
-
.rt-Card
|
|
93
|
-
)
|
|
94
|
-
& {
|
|
95
|
-
backdrop-filter: none !important;
|
|
96
|
-
}
|
|
97
82
|
}
|
|
98
83
|
& {
|
|
99
84
|
contain: paint;
|
|
@@ -319,6 +304,7 @@
|
|
|
319
304
|
/* Theme-level translucent override */
|
|
320
305
|
:where([data-panel-background='translucent'], [data-material='translucent']) & {
|
|
321
306
|
backdrop-filter: var(--backdrop-filter-panel);
|
|
307
|
+
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
322
308
|
}
|
|
323
309
|
|
|
324
310
|
/* Component-level overrides (higher specificity) */
|
|
@@ -327,11 +313,7 @@
|
|
|
327
313
|
--backdrop-filter-panel: none;
|
|
328
314
|
}
|
|
329
315
|
|
|
330
|
-
:where(
|
|
331
|
-
.rt-BaseCard[data-panel-background='translucent'],
|
|
332
|
-
.rt-BaseCard[data-material='translucent']
|
|
333
|
-
)
|
|
334
|
-
& {
|
|
316
|
+
:where(.rt-BaseCard[data-panel-background='translucent'], .rt-BaseCard[data-material='translucent']) & {
|
|
335
317
|
backdrop-filter: var(--backdrop-filter-panel);
|
|
336
318
|
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
337
319
|
}
|
|
@@ -362,18 +344,13 @@
|
|
|
362
344
|
}
|
|
363
345
|
|
|
364
346
|
/* Component-level overrides for hover */
|
|
365
|
-
:where(.rt-BaseCard[data-panel-background='solid'], .rt-BaseCard[data-material='solid'])
|
|
366
|
-
& {
|
|
347
|
+
:where(.rt-BaseCard[data-panel-background='solid'], .rt-BaseCard[data-material='solid']) & {
|
|
367
348
|
background-color: var(--gray-2);
|
|
368
349
|
backdrop-filter: none;
|
|
369
350
|
--backdrop-filter-panel: none;
|
|
370
351
|
}
|
|
371
352
|
|
|
372
|
-
:where(
|
|
373
|
-
.rt-BaseCard[data-panel-background='translucent'],
|
|
374
|
-
.rt-BaseCard[data-material='translucent']
|
|
375
|
-
)
|
|
376
|
-
& {
|
|
353
|
+
:where(.rt-BaseCard[data-panel-background='translucent'], .rt-BaseCard[data-material='translucent']) & {
|
|
377
354
|
background-color: color-mix(in srgb, var(--gray-a2), var(--gray-2) 60%);
|
|
378
355
|
backdrop-filter: var(--backdrop-filter-panel);
|
|
379
356
|
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
@@ -406,11 +383,7 @@
|
|
|
406
383
|
--backdrop-filter-panel: none;
|
|
407
384
|
}
|
|
408
385
|
|
|
409
|
-
:where(
|
|
410
|
-
.rt-BaseCard[data-panel-background='translucent'],
|
|
411
|
-
.rt-BaseCard[data-material='translucent']
|
|
412
|
-
)
|
|
413
|
-
& {
|
|
386
|
+
:where(.rt-BaseCard[data-panel-background='translucent'], .rt-BaseCard[data-material='translucent']) & {
|
|
414
387
|
background-color: color-mix(in srgb, var(--gray-a3), var(--gray-3) 60%);
|
|
415
388
|
backdrop-filter: var(--backdrop-filter-panel);
|
|
416
389
|
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
@@ -441,11 +414,7 @@
|
|
|
441
414
|
--backdrop-filter-panel: none;
|
|
442
415
|
}
|
|
443
416
|
|
|
444
|
-
:where(
|
|
445
|
-
.rt-BaseCard[data-panel-background='translucent'],
|
|
446
|
-
.rt-BaseCard[data-material='translucent']
|
|
447
|
-
)
|
|
448
|
-
& {
|
|
417
|
+
:where(.rt-BaseCard[data-panel-background='translucent'], .rt-BaseCard[data-material='translucent']) & {
|
|
449
418
|
background-color: color-mix(in srgb, var(--gray-a3), var(--gray-3) 60%);
|
|
450
419
|
backdrop-filter: var(--backdrop-filter-panel);
|
|
451
420
|
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
@@ -696,6 +665,7 @@
|
|
|
696
665
|
/* Theme-level translucent override */
|
|
697
666
|
:where([data-panel-background='translucent'], [data-material='translucent']) & {
|
|
698
667
|
backdrop-filter: var(--backdrop-filter-panel);
|
|
668
|
+
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
699
669
|
}
|
|
700
670
|
|
|
701
671
|
/* Component-level overrides (higher specificity) */
|
|
@@ -704,11 +674,7 @@
|
|
|
704
674
|
--backdrop-filter-panel: none;
|
|
705
675
|
}
|
|
706
676
|
|
|
707
|
-
:where(
|
|
708
|
-
.rt-BaseCard[data-panel-background='translucent'],
|
|
709
|
-
.rt-BaseCard[data-material='translucent']
|
|
710
|
-
)
|
|
711
|
-
& {
|
|
677
|
+
:where(.rt-BaseCard[data-panel-background='translucent'], .rt-BaseCard[data-material='translucent']) & {
|
|
712
678
|
backdrop-filter: var(--backdrop-filter-panel);
|
|
713
679
|
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
714
680
|
}
|
|
@@ -739,18 +705,13 @@
|
|
|
739
705
|
}
|
|
740
706
|
|
|
741
707
|
/* Component-level overrides for hover */
|
|
742
|
-
:where(.rt-BaseCard[data-panel-background='solid'], .rt-BaseCard[data-material='solid'])
|
|
743
|
-
& {
|
|
708
|
+
:where(.rt-BaseCard[data-panel-background='solid'], .rt-BaseCard[data-material='solid']) & {
|
|
744
709
|
background-color: var(--gray-3);
|
|
745
710
|
backdrop-filter: none;
|
|
746
711
|
--backdrop-filter-panel: none;
|
|
747
712
|
}
|
|
748
713
|
|
|
749
|
-
:where(
|
|
750
|
-
.rt-BaseCard[data-panel-background='translucent'],
|
|
751
|
-
.rt-BaseCard[data-material='translucent']
|
|
752
|
-
)
|
|
753
|
-
& {
|
|
714
|
+
:where(.rt-BaseCard[data-panel-background='translucent'], .rt-BaseCard[data-material='translucent']) & {
|
|
754
715
|
background-color: color-mix(in srgb, var(--gray-a3), var(--gray-3) 60%);
|
|
755
716
|
backdrop-filter: var(--backdrop-filter-panel);
|
|
756
717
|
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
@@ -793,11 +754,7 @@
|
|
|
793
754
|
--backdrop-filter-panel: none;
|
|
794
755
|
}
|
|
795
756
|
|
|
796
|
-
:where(
|
|
797
|
-
.rt-BaseCard[data-panel-background='translucent'],
|
|
798
|
-
.rt-BaseCard[data-material='translucent']
|
|
799
|
-
)
|
|
800
|
-
& {
|
|
757
|
+
:where(.rt-BaseCard[data-panel-background='translucent'], .rt-BaseCard[data-material='translucent']) & {
|
|
801
758
|
background-color: color-mix(in srgb, var(--gray-a3), var(--gray-3) 60%);
|
|
802
759
|
backdrop-filter: var(--backdrop-filter-panel);
|
|
803
760
|
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
@@ -839,11 +796,7 @@
|
|
|
839
796
|
--backdrop-filter-panel: none;
|
|
840
797
|
}
|
|
841
798
|
|
|
842
|
-
:where(
|
|
843
|
-
.rt-BaseCard[data-panel-background='translucent'],
|
|
844
|
-
.rt-BaseCard[data-material='translucent']
|
|
845
|
-
)
|
|
846
|
-
& {
|
|
799
|
+
:where(.rt-BaseCard[data-panel-background='translucent'], .rt-BaseCard[data-material='translucent']) & {
|
|
847
800
|
background-color: color-mix(in srgb, var(--gray-a3), var(--gray-3) 60%);
|
|
848
801
|
backdrop-filter: var(--backdrop-filter-panel);
|
|
849
802
|
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
@@ -895,6 +848,7 @@
|
|
|
895
848
|
/* Theme-level translucent override */
|
|
896
849
|
:where([data-panel-background='translucent'], [data-material='translucent']) & {
|
|
897
850
|
backdrop-filter: var(--backdrop-filter-panel);
|
|
851
|
+
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
898
852
|
}
|
|
899
853
|
|
|
900
854
|
/* Component-level overrides (higher specificity) */
|
|
@@ -903,11 +857,7 @@
|
|
|
903
857
|
--backdrop-filter-panel: none;
|
|
904
858
|
}
|
|
905
859
|
|
|
906
|
-
:where(
|
|
907
|
-
.rt-BaseCard[data-panel-background='translucent'],
|
|
908
|
-
.rt-BaseCard[data-material='translucent']
|
|
909
|
-
)
|
|
910
|
-
& {
|
|
860
|
+
:where(.rt-BaseCard[data-panel-background='translucent'], .rt-BaseCard[data-material='translucent']) & {
|
|
911
861
|
backdrop-filter: var(--backdrop-filter-panel);
|
|
912
862
|
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
913
863
|
}
|
|
@@ -950,18 +900,13 @@
|
|
|
950
900
|
}
|
|
951
901
|
|
|
952
902
|
/* Component-level overrides for hover */
|
|
953
|
-
:where(.rt-BaseCard[data-panel-background='solid'], .rt-BaseCard[data-material='solid'])
|
|
954
|
-
& {
|
|
903
|
+
:where(.rt-BaseCard[data-panel-background='solid'], .rt-BaseCard[data-material='solid']) & {
|
|
955
904
|
background-color: var(--gray-2);
|
|
956
905
|
backdrop-filter: none;
|
|
957
906
|
--backdrop-filter-panel: none;
|
|
958
907
|
}
|
|
959
908
|
|
|
960
|
-
:where(
|
|
961
|
-
.rt-BaseCard[data-panel-background='translucent'],
|
|
962
|
-
.rt-BaseCard[data-material='translucent']
|
|
963
|
-
)
|
|
964
|
-
& {
|
|
909
|
+
:where(.rt-BaseCard[data-panel-background='translucent'], .rt-BaseCard[data-material='translucent']) & {
|
|
965
910
|
background-color: color-mix(in srgb, var(--gray-a2), var(--gray-2) 60%);
|
|
966
911
|
backdrop-filter: var(--backdrop-filter-panel);
|
|
967
912
|
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
@@ -997,11 +942,7 @@
|
|
|
997
942
|
--backdrop-filter-panel: none;
|
|
998
943
|
}
|
|
999
944
|
|
|
1000
|
-
:where(
|
|
1001
|
-
.rt-BaseCard[data-panel-background='translucent'],
|
|
1002
|
-
.rt-BaseCard[data-material='translucent']
|
|
1003
|
-
)
|
|
1004
|
-
& {
|
|
945
|
+
:where(.rt-BaseCard[data-panel-background='translucent'], .rt-BaseCard[data-material='translucent']) & {
|
|
1005
946
|
background-color: color-mix(in srgb, var(--gray-a2), var(--gray-2) 60%);
|
|
1006
947
|
backdrop-filter: var(--backdrop-filter-panel);
|
|
1007
948
|
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
@@ -1036,11 +977,7 @@
|
|
|
1036
977
|
--backdrop-filter-panel: none;
|
|
1037
978
|
}
|
|
1038
979
|
|
|
1039
|
-
:where(
|
|
1040
|
-
.rt-BaseCard[data-panel-background='translucent'],
|
|
1041
|
-
.rt-BaseCard[data-material='translucent']
|
|
1042
|
-
)
|
|
1043
|
-
& {
|
|
980
|
+
:where(.rt-BaseCard[data-panel-background='translucent'], .rt-BaseCard[data-material='translucent']) & {
|
|
1044
981
|
background-color: color-mix(in srgb, var(--gray-a3), var(--gray-3) 60%);
|
|
1045
982
|
backdrop-filter: var(--backdrop-filter-panel);
|
|
1046
983
|
--backdrop-filter-panel: blur(var(--backdrop-blur-panel));
|
|
@@ -5,19 +5,7 @@
|
|
|
5
5
|
- Shared tokens defined/consumed: --sidebar-base-border-radius, etc.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
/* Sidebar Provider
|
|
9
|
-
.rt-SidebarProvider {
|
|
10
|
-
/* Positioning based on side */
|
|
11
|
-
&:where([data-side='left']) {
|
|
12
|
-
/* Left side is default - no additional positioning needed */
|
|
13
|
-
order: -1; /* Ensure it appears first in flex container */
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&:where([data-side='right']) {
|
|
17
|
-
/* Position on the right side */
|
|
18
|
-
order: 999; /* Push to end in flex container */
|
|
19
|
-
}
|
|
20
|
-
}
|
|
8
|
+
/* Removed Sidebar Provider (unused) */
|
|
21
9
|
|
|
22
10
|
/* Sidebar Root Container */
|
|
23
11
|
.rt-SidebarRoot {
|
|
@@ -129,9 +117,4 @@
|
|
|
129
117
|
margin: var(--space-2) 0;
|
|
130
118
|
}
|
|
131
119
|
|
|
132
|
-
/*
|
|
133
|
-
@media (max-width: 768px) {
|
|
134
|
-
.rt-SidebarRoot:not(:where(.rt-SheetContent .rt-SidebarRoot)) {
|
|
135
|
-
display: none;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
120
|
+
/* Removed mobile hide rule; Shell handles overlay vs inline */
|
|
@@ -6,7 +6,7 @@ import { useShell } from '../shell.context.js';
|
|
|
6
6
|
import { useResponsivePresentation, useResponsiveValue } from '../shell.hooks.js';
|
|
7
7
|
import { PaneResizeContext } from './shell-resize.js';
|
|
8
8
|
import { BottomHandle, PaneHandle } from './shell-handles.js';
|
|
9
|
-
import {
|
|
9
|
+
import { _BREAKPOINTS } from '../shell.types.js';
|
|
10
10
|
import type { Breakpoint, PaneMode, PaneSizePersistence, ResponsivePresentation } from '../shell.types.js';
|
|
11
11
|
|
|
12
12
|
interface PaneProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
@@ -6,7 +6,7 @@ import { useShell } from '../shell.context.js';
|
|
|
6
6
|
import { useResponsivePresentation, useResponsiveValue } from '../shell.hooks.js';
|
|
7
7
|
import { PaneResizeContext } from './shell-resize.js';
|
|
8
8
|
import { InspectorHandle, PaneHandle } from './shell-handles.js';
|
|
9
|
-
import {
|
|
9
|
+
import { _BREAKPOINTS } from '../shell.types.js';
|
|
10
10
|
import type { Breakpoint, PaneMode, PaneSizePersistence, ResponsivePresentation } from '../shell.types.js';
|
|
11
11
|
|
|
12
12
|
interface PaneProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
@@ -6,8 +6,8 @@ import { useShell } from '../shell.context.js';
|
|
|
6
6
|
import { useResponsivePresentation, useResponsiveValue } from '../shell.hooks.js';
|
|
7
7
|
import { PaneResizeContext } from './shell-resize.js';
|
|
8
8
|
import { SidebarHandle, PaneHandle } from './shell-handles.js';
|
|
9
|
-
import type { Breakpoint, PaneMode, PaneSizePersistence,
|
|
10
|
-
import {
|
|
9
|
+
import type { Breakpoint, PaneMode, PaneSizePersistence, ResponsivePresentation, SidebarMode, Responsive } from '../shell.types.js';
|
|
10
|
+
import { _BREAKPOINTS } from '../shell.types.js';
|
|
11
11
|
|
|
12
12
|
interface PaneProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
13
13
|
presentation?: ResponsivePresentation;
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
text-align: left;
|
|
7
7
|
color: var(--accent-a11);
|
|
8
8
|
transition: var(--transition-card);
|
|
9
|
+
border-radius: var(--callout-border-radius);
|
|
9
10
|
|
|
10
11
|
/* Theme-level translucent override */
|
|
11
12
|
:where([data-panel-background='translucent'], [data-material='translucent']) & {
|
|
@@ -21,7 +22,7 @@
|
|
|
21
22
|
backdrop-filter: none;
|
|
22
23
|
--backdrop-filter-components: none;
|
|
23
24
|
}
|
|
24
|
-
|
|
25
|
+
|
|
25
26
|
&:where([data-panel-background='translucent'], [data-material='translucent']) {
|
|
26
27
|
backdrop-filter: var(--backdrop-filter-components);
|
|
27
28
|
--backdrop-filter-components: blur(var(--backdrop-blur-components));
|
|
@@ -79,7 +80,7 @@
|
|
|
79
80
|
row-gap: var(--space-2);
|
|
80
81
|
column-gap: var(--space-2);
|
|
81
82
|
padding: var(--space-3);
|
|
82
|
-
border-radius: var(--radius-1);
|
|
83
|
+
--callout-border-radius: min(var(--radius-5), calc(var(--radius-1) + var(--space-1)));
|
|
83
84
|
--callout-icon-height: var(--line-height-1);
|
|
84
85
|
--callout-icon-size: var(--content-icon-size-1);
|
|
85
86
|
}
|
|
@@ -87,7 +88,7 @@
|
|
|
87
88
|
row-gap: var(--space-2);
|
|
88
89
|
column-gap: var(--space-3);
|
|
89
90
|
padding: var(--space-4);
|
|
90
|
-
border-radius: var(--radius-2);
|
|
91
|
+
--callout-border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
|
|
91
92
|
--callout-icon-height: var(--line-height-2);
|
|
92
93
|
--callout-icon-size: var(--content-icon-size-2);
|
|
93
94
|
}
|
|
@@ -95,10 +96,26 @@
|
|
|
95
96
|
row-gap: var(--space-3);
|
|
96
97
|
column-gap: var(--space-4);
|
|
97
98
|
padding: var(--space-5);
|
|
98
|
-
border-radius: var(--radius-3);
|
|
99
|
+
--callout-border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
|
|
99
100
|
--callout-icon-height: var(--line-height-3);
|
|
100
101
|
--callout-icon-size: var(--content-icon-size-3);
|
|
101
102
|
}
|
|
103
|
+
&:where(.rt-r-size-4) {
|
|
104
|
+
row-gap: var(--space-3);
|
|
105
|
+
column-gap: var(--space-5);
|
|
106
|
+
padding: var(--space-6);
|
|
107
|
+
--callout-border-radius: min(var(--radius-8), calc(var(--radius-4) + var(--space-4)));
|
|
108
|
+
--callout-icon-height: var(--line-height-4);
|
|
109
|
+
--callout-icon-size: var(--content-icon-size-4);
|
|
110
|
+
}
|
|
111
|
+
&:where(.rt-r-size-5) {
|
|
112
|
+
row-gap: var(--space-4);
|
|
113
|
+
column-gap: var(--space-6);
|
|
114
|
+
padding: var(--space-7);
|
|
115
|
+
--callout-border-radius: min(var(--radius-9), calc(var(--radius-5) + var(--space-5)));
|
|
116
|
+
--callout-icon-height: var(--line-height-5);
|
|
117
|
+
--callout-icon-size: var(--content-icon-size-5);
|
|
118
|
+
}
|
|
102
119
|
}
|
|
103
120
|
}
|
|
104
121
|
|
|
@@ -234,4 +251,4 @@
|
|
|
234
251
|
background-color: var(--color-surface-translucent);
|
|
235
252
|
}
|
|
236
253
|
}
|
|
237
|
-
}
|
|
254
|
+
}
|
|
@@ -8,9 +8,7 @@ import { Flex } from './flex.js';
|
|
|
8
8
|
import { ScrollArea } from './scroll-area.js';
|
|
9
9
|
import { Slot } from './slot.js';
|
|
10
10
|
import { Box } from './box.js';
|
|
11
|
-
import { Card } from './card.js';
|
|
12
11
|
import { Text } from './text.js';
|
|
13
|
-
import { Inset } from './inset.js';
|
|
14
12
|
import { useDropzone } from 'react-dropzone';
|
|
15
13
|
import type { ComponentPropsWithout, RemovedProps } from '../helpers/component-props.js';
|
|
16
14
|
|
|
@@ -287,7 +285,10 @@ const Root = React.forwardRef<RootElement, RootProps>((props, forwardedRef) => {
|
|
|
287
285
|
// `attachments={undefined}` to clear attachments. In that case we normalize to an empty array.
|
|
288
286
|
const isAttachmentsControlled = 'attachments' in props;
|
|
289
287
|
const [attachmentsUncontrolled, setAttachmentsUncontrolled] = React.useState<ChatbarAttachment[]>(defaultAttachments);
|
|
290
|
-
const attachments =
|
|
288
|
+
const attachments = React.useMemo(
|
|
289
|
+
() => (isAttachmentsControlled ? ((attachmentsProp ?? []) as ChatbarAttachment[]) : attachmentsUncontrolled),
|
|
290
|
+
[isAttachmentsControlled, attachmentsProp, attachmentsUncontrolled],
|
|
291
|
+
);
|
|
291
292
|
|
|
292
293
|
// Track generated object URLs for cleanup
|
|
293
294
|
const generatedUrlSetRef = React.useRef<Set<string>>(new Set());
|
|
@@ -416,11 +417,12 @@ const Root = React.forwardRef<RootElement, RootProps>((props, forwardedRef) => {
|
|
|
416
417
|
|
|
417
418
|
// Revoke any remaining generated URLs on unmount
|
|
418
419
|
React.useEffect(() => {
|
|
420
|
+
const urlSet = generatedUrlSetRef.current;
|
|
419
421
|
return () => {
|
|
420
|
-
for (const url of Array.from(
|
|
422
|
+
for (const url of Array.from(urlSet)) {
|
|
421
423
|
URL.revokeObjectURL(url);
|
|
422
424
|
}
|
|
423
|
-
|
|
425
|
+
urlSet.clear();
|
|
424
426
|
};
|
|
425
427
|
}, []);
|
|
426
428
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import type { Breakpoint, PresentationValue, ResponsivePresentation } from './shell.types.js';
|
|
3
|
-
import {
|
|
3
|
+
import { _BREAKPOINTS } from './shell.types.js';
|
|
4
4
|
import { useShell } from './shell.context.js';
|
|
5
5
|
|
|
6
6
|
export function useResponsivePresentation(presentation: ResponsivePresentation): PresentationValue {
|
|
@@ -15,7 +15,7 @@ export function useResponsivePresentation(presentation: ResponsivePresentation):
|
|
|
15
15
|
return presentation[currentBreakpoint]!;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
-
const bpKeys = Object.keys(
|
|
18
|
+
const bpKeys = Object.keys(_BREAKPOINTS) as Array<keyof typeof _BREAKPOINTS>;
|
|
19
19
|
const order: Breakpoint[] = ([...bpKeys].reverse() as Breakpoint[]).concat('initial' as Breakpoint);
|
|
20
20
|
const startIdx = order.indexOf(currentBreakpoint as Breakpoint);
|
|
21
21
|
|
|
@@ -50,7 +50,7 @@ export function useResponsiveValue<T>(value: T | Partial<Record<Breakpoint, T>>
|
|
|
50
50
|
return map[currentBreakpoint as Breakpoint] as T;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
const bpKeys = Object.keys(
|
|
53
|
+
const bpKeys = Object.keys(_BREAKPOINTS) as Array<keyof typeof _BREAKPOINTS>;
|
|
54
54
|
const order: Breakpoint[] = ([...bpKeys].reverse() as Breakpoint[]).concat('initial' as Breakpoint);
|
|
55
55
|
const startIdx = order.indexOf(currentBreakpoint as Breakpoint);
|
|
56
56
|
|
package/src/components/shell.tsx
CHANGED
|
@@ -31,12 +31,12 @@ import * as Sheet from './sheet.js';
|
|
|
31
31
|
import { VisuallyHidden } from './visually-hidden.js';
|
|
32
32
|
import { useResponsivePresentation, useResponsiveValue } from './shell.hooks.js';
|
|
33
33
|
import { PaneResizeContext } from './_internal/shell-resize.js';
|
|
34
|
-
import { PaneHandle, PanelHandle
|
|
34
|
+
import { PaneHandle, PanelHandle } from './_internal/shell-handles.js';
|
|
35
35
|
import { Sidebar } from './_internal/shell-sidebar.js';
|
|
36
36
|
import { Bottom } from './_internal/shell-bottom.js';
|
|
37
37
|
import { Inspector } from './_internal/shell-inspector.js';
|
|
38
38
|
import type { PresentationValue, ResponsivePresentation, PaneMode, SidebarMode, PaneSizePersistence, Breakpoint, PaneTarget, Responsive } from './shell.types.js';
|
|
39
|
-
import {
|
|
39
|
+
import { _BREAKPOINTS } from './shell.types.js';
|
|
40
40
|
import {
|
|
41
41
|
ShellProvider,
|
|
42
42
|
useShell,
|
|
@@ -75,7 +75,7 @@ function useBreakpoint(): { bp: Breakpoint; ready: boolean } {
|
|
|
75
75
|
React.useEffect(() => {
|
|
76
76
|
if (typeof window === 'undefined') return;
|
|
77
77
|
|
|
78
|
-
const queries: [key: keyof typeof
|
|
78
|
+
const queries: [key: keyof typeof _BREAKPOINTS, query: string][] = Object.entries(_BREAKPOINTS) as any;
|
|
79
79
|
const mqls = queries.map(([k, q]) => [k, window.matchMedia(q)] as const);
|
|
80
80
|
|
|
81
81
|
const compute = () => {
|
|
@@ -556,7 +556,7 @@ type RailProps = React.ComponentPropsWithoutRef<'div'> & {
|
|
|
556
556
|
|
|
557
557
|
// Left container - behaves like Inspector but contains Rail+Panel
|
|
558
558
|
const Left = React.forwardRef<HTMLDivElement, LeftProps>(
|
|
559
|
-
({ className, presentation = { initial: 'fixed', sm: 'fixed' }, collapsible = true, onExpand, onCollapse, children, style, ...props }, ref) => {
|
|
559
|
+
({ className, presentation = { initial: 'fixed', sm: 'fixed' }, collapsible: _collapsible = true, onExpand, onCollapse, children, style, ...props }, ref) => {
|
|
560
560
|
const shell = useShell();
|
|
561
561
|
const resolvedPresentation = useResponsivePresentation(presentation);
|
|
562
562
|
const isOverlay = resolvedPresentation === 'overlay';
|
|
@@ -581,7 +581,7 @@ const Left = React.forwardRef<HTMLDivElement, LeftProps>(
|
|
|
581
581
|
return () => shell.setHasLeft(false);
|
|
582
582
|
}, [shell]);
|
|
583
583
|
|
|
584
|
-
const
|
|
584
|
+
const _lastBpRef = React.useRef<Breakpoint | null>(null);
|
|
585
585
|
const lastLeftModeRef = React.useRef<PaneMode | null>(null);
|
|
586
586
|
const initNotifiedRef = React.useRef(false);
|
|
587
587
|
const resolvedDefaultOpen = useResponsiveValue((props as any).defaultOpen as any);
|
|
@@ -633,7 +633,7 @@ const Left = React.forwardRef<HTMLDivElement, LeftProps>(
|
|
|
633
633
|
}
|
|
634
634
|
}, [shell.leftMode, onExpand, onCollapse]);
|
|
635
635
|
|
|
636
|
-
const
|
|
636
|
+
const _isExpanded = shell.leftMode === 'expanded';
|
|
637
637
|
|
|
638
638
|
// Left is not resizable; width derives from Rail/Panel.
|
|
639
639
|
|
|
@@ -674,11 +674,11 @@ const Left = React.forwardRef<HTMLDivElement, LeftProps>(
|
|
|
674
674
|
const isType = (el: React.ReactElement, comp: any) => React.isValidElement(el) && el.type === comp;
|
|
675
675
|
const railEl = childArray.find((el) => isType(el, Rail));
|
|
676
676
|
const panelEl = childArray.find((el) => isType(el, Panel));
|
|
677
|
-
const
|
|
678
|
-
const
|
|
679
|
-
const
|
|
680
|
-
const
|
|
681
|
-
const
|
|
677
|
+
const _railSize = typeof (railEl as any)?.props?.expandedSize === 'number' ? (railEl as any).props.expandedSize : 64;
|
|
678
|
+
const _panelSize = typeof (panelEl as any)?.props?.expandedSize === 'number' ? (panelEl as any).props.expandedSize : 288;
|
|
679
|
+
const _hasRail = Boolean(railEl);
|
|
680
|
+
const _hasPanel = Boolean(panelEl);
|
|
681
|
+
const _includePanel = _hasPanel && (shell.panelMode === 'expanded' || shell.peekTarget === 'panel');
|
|
682
682
|
|
|
683
683
|
// Strip control props from DOM spread
|
|
684
684
|
const { open: _openIgnored, defaultOpen: _defaultOpenIgnored, onOpenChange: _onOpenChangeIgnored, ...stackDomProps } = props as any;
|
|
@@ -810,7 +810,7 @@ type PanelComponent = React.ForwardRefExoticComponent<PanelPublicProps & React.R
|
|
|
810
810
|
Handle: HandleComponent;
|
|
811
811
|
};
|
|
812
812
|
|
|
813
|
-
type
|
|
813
|
+
type _SidebarComponent = React.ForwardRefExoticComponent<
|
|
814
814
|
(Omit<PaneProps, 'mode' | 'defaultMode' | 'onModeChange'> & {
|
|
815
815
|
state?: Responsive<SidebarMode>;
|
|
816
816
|
defaultState?: SidebarMode;
|
|
@@ -821,9 +821,9 @@ type SidebarComponent = React.ForwardRefExoticComponent<
|
|
|
821
821
|
React.RefAttributes<HTMLDivElement>
|
|
822
822
|
> & { Handle: HandleComponent };
|
|
823
823
|
|
|
824
|
-
type
|
|
824
|
+
type _InspectorComponent = React.ForwardRefExoticComponent<PaneProps & React.RefAttributes<HTMLDivElement>> & { Handle: HandleComponent };
|
|
825
825
|
|
|
826
|
-
type
|
|
826
|
+
type _BottomComponent = React.ForwardRefExoticComponent<PaneProps & React.RefAttributes<HTMLDivElement>> & { Handle: HandleComponent };
|
|
827
827
|
|
|
828
828
|
const Panel = React.forwardRef<HTMLDivElement, PanelPublicProps>(
|
|
829
829
|
(
|
|
@@ -16,7 +16,7 @@ export type PaneSizePersistence = {
|
|
|
16
16
|
save?: (size: number) => void | Promise<void>;
|
|
17
17
|
};
|
|
18
18
|
|
|
19
|
-
export const
|
|
19
|
+
export const _BREAKPOINTS = {
|
|
20
20
|
xs: '(min-width: 520px)',
|
|
21
21
|
sm: '(min-width: 768px)',
|
|
22
22
|
md: '(min-width: 1024px)',
|
|
@@ -24,6 +24,6 @@ export const BREAKPOINTS = {
|
|
|
24
24
|
xl: '(min-width: 1640px)',
|
|
25
25
|
} as const;
|
|
26
26
|
|
|
27
|
-
export type Breakpoint = 'initial' | keyof typeof
|
|
27
|
+
export type Breakpoint = 'initial' | keyof typeof _BREAKPOINTS;
|
|
28
28
|
|
|
29
29
|
export type PaneTarget = 'left' | 'rail' | 'panel' | 'sidebar' | 'inspector' | 'bottom';
|
package/src/components/table.css
CHANGED
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
.rt-TableColumnHeaderCell {
|
|
48
|
-
font-weight:
|
|
48
|
+
font-weight: 600;
|
|
49
49
|
}
|
|
50
50
|
.rt-TableRowHeaderCell {
|
|
51
51
|
font-weight: normal;
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
@breakpoints {
|
|
61
61
|
.rt-TableRoot {
|
|
62
62
|
&:where(.rt-r-size-1) {
|
|
63
|
-
--table-border-radius: var(--radius-
|
|
63
|
+
--table-border-radius: min(var(--radius-5), calc(var(--radius-1) + var(--space-1)));
|
|
64
64
|
--table-cell-padding: var(--space-2);
|
|
65
65
|
--table-cell-min-height: calc(36px * var(--scaling));
|
|
66
66
|
|
|
@@ -70,7 +70,7 @@
|
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
&:where(.rt-r-size-2) {
|
|
73
|
-
--table-border-radius: var(--radius-
|
|
73
|
+
--table-border-radius: min(var(--radius-6), calc(var(--radius-2) + var(--space-2)));
|
|
74
74
|
--table-cell-padding: var(--space-3);
|
|
75
75
|
--table-cell-min-height: calc(44px * var(--scaling));
|
|
76
76
|
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
82
|
&:where(.rt-r-size-3) {
|
|
83
|
-
--table-border-radius: var(--radius-
|
|
84
|
-
--table-cell-padding: var(--space-
|
|
83
|
+
--table-border-radius: min(var(--radius-7), calc(var(--radius-3) + var(--space-3)));
|
|
84
|
+
--table-cell-padding: var(--space-4);
|
|
85
85
|
--table-cell-min-height: var(--space-8);
|
|
86
86
|
|
|
87
87
|
& :where(.rt-TableRootTable) {
|
|
@@ -89,6 +89,26 @@
|
|
|
89
89
|
line-height: var(--line-height-3);
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
|
+
&:where(.rt-r-size-4) {
|
|
93
|
+
--table-border-radius: min(var(--radius-8), calc(var(--radius-4) + var(--space-4)));
|
|
94
|
+
--table-cell-padding: var(--space-5);
|
|
95
|
+
--table-cell-min-height: var(--space-9);
|
|
96
|
+
|
|
97
|
+
& :where(.rt-TableRootTable) {
|
|
98
|
+
font-size: var(--font-size-3);
|
|
99
|
+
line-height: var(--line-height-3);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
&:where(.rt-r-size-5) {
|
|
103
|
+
--table-border-radius: min(var(--radius-9), calc(var(--radius-5) + var(--space-5)));
|
|
104
|
+
--table-cell-padding: var(--space-6);
|
|
105
|
+
--table-cell-min-height: var(--space-10);
|
|
106
|
+
|
|
107
|
+
& :where(.rt-TableRootTable) {
|
|
108
|
+
font-size: var(--font-size-4);
|
|
109
|
+
line-height: var(--line-height-4);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
92
112
|
}
|
|
93
113
|
}
|
|
94
114
|
|