@dxos/ui-theme 0.8.4-main.937b3ca → 0.8.4-main.bc674ce

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/ui-theme",
3
- "version": "0.8.4-main.937b3ca",
3
+ "version": "0.8.4-main.bc674ce",
4
4
  "description": "A set of design system tokens to use with DXOS UI.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -64,8 +64,8 @@
64
64
  "tailwindcss": "~3.4.1",
65
65
  "tailwindcss-logical": "^3.0.0",
66
66
  "tailwindcss-radix": "^2.8.0",
67
- "@dxos/node-std": "0.8.4-main.937b3ca",
68
- "@dxos/util": "0.8.4-main.937b3ca"
67
+ "@dxos/util": "0.8.4-main.bc674ce",
68
+ "@dxos/node-std": "0.8.4-main.bc674ce"
69
69
  },
70
70
  "devDependencies": {
71
71
  "@ch-ui/colors": "1.2.1",
@@ -73,7 +73,7 @@
73
73
  "@types/postcss-import": "^14.0.3",
74
74
  "esbuild": "0.25.10",
75
75
  "vite": "7.1.9",
76
- "@dxos/ui-types": "0.8.4-main.937b3ca"
76
+ "@dxos/ui-types": "0.8.4-main.bc674ce"
77
77
  },
78
78
  "publishConfig": {
79
79
  "access": "public"
@@ -6,31 +6,33 @@ import { type ComponentFunction } from '@dxos/ui-types';
6
6
 
7
7
  import { mx } from '../../util';
8
8
 
9
- // Padding to apply to in-flow elements which need to clear the fixed topbar / bottombar.
9
+ // Padding to apply to in-flow elements which need to clear the fixed topbar/bottombar.
10
10
  export const topbarBlockPaddingStart = 'pbs-[--topbar-size] sticky-top-from-topbar-bottom';
11
11
  export const bottombarBlockPaddingEnd = 'pbe-[--statusbar-size] sticky-bottom-from-statusbar-bottom';
12
12
 
13
+ export const mainPadding = 'dx-main-content-padding';
14
+ export const mainPaddingTransitions = 'dx-main-content-padding-transitions';
15
+ export const mainIntrinsicSize = 'dx-main-intrinsic-size';
16
+
13
17
  export type MainStyleProps = Partial<{
14
18
  bounce: boolean;
15
19
  handlesFocus: boolean;
16
20
  }>;
17
21
 
18
- export const mainSidebar: ComponentFunction<MainStyleProps> = (_, ...etc) =>
19
- mx('dx-main-sidebar', 'dx-focus-ring-inset-over-all', ...etc);
20
-
21
- export const mainPadding = 'dx-main-content-padding';
22
-
23
- export const mainPaddingTransitions = 'dx-main-content-padding-transitions';
24
-
25
22
  export const mainContent: ComponentFunction<MainStyleProps> = ({ bounce }, ...etc) =>
26
23
  mx(mainPadding, mainPaddingTransitions, bounce && 'dx-main-bounce-layout', 'dx-focus-ring-main', ...etc);
27
24
 
28
- export const mainIntrinsicSize = 'dx-main-intrinsic-size';
25
+ export const mainSidebar: ComponentFunction<MainStyleProps> = (_, ...etc) =>
26
+ mx('dx-main-sidebar', 'dx-focus-ring-inset-over-all', ...etc);
27
+
28
+ export const mainDrawer: ComponentFunction<MainStyleProps> = (_, ...etc) =>
29
+ mx('dx-main-drawer', 'dx-focus-ring-inset-over-all', ...etc);
29
30
 
30
31
  export const mainOverlay: ComponentFunction<MainStyleProps> = (_, ...etc) => mx('dx-main-overlay', ...etc);
31
32
 
32
33
  export const mainTheme = {
33
34
  content: mainContent,
34
35
  sidebar: mainSidebar,
36
+ drawer: mainDrawer,
35
37
  overlay: mainOverlay,
36
38
  };
@@ -1,9 +1,20 @@
1
- /* Main component classes */
2
-
3
1
  @layer utilities {
4
2
  .dx-main-content-padding {
5
3
  @apply pis-0 scroll-ps-0 pie-0 scroll-pe-0;
6
4
 
5
+ /* Constrain content height when drawer is expanded. */
6
+ &[data-drawer-state='expanded'] {
7
+ max-block-size: calc(100dvh - var(--drawer-size));
8
+ }
9
+
10
+ /* Hide content when drawer is full. */
11
+ &[data-drawer-state='full'] {
12
+ max-block-size: 0;
13
+ overflow: hidden !important;
14
+ visibility: hidden;
15
+ pointer-events: none;
16
+ }
17
+
7
18
  @media (min-width: theme('screens.lg')) {
8
19
  &[data-sidebar-inline-start-state='collapsed'] {
9
20
  @apply pis-[--l0-size] scroll-ps-[--l0-size];
@@ -65,7 +76,23 @@
65
76
  }
66
77
 
67
78
  .dx-main-bounce-layout {
68
- @apply fixed inset-0 z-0 overflow-auto overscroll-auto;
79
+ @apply fixed overflow-auto overscroll-auto;
80
+ @apply duration-200 ease-in-out-symmetric;
81
+ transition-property: inset-block-end;
82
+ inset-inline-start: 0;
83
+ inset-inline-end: 0;
84
+ inset-block-start: 0;
85
+ inset-block-end: 0;
86
+ z-index: 0;
87
+
88
+ &[data-drawer-state='expanded'] {
89
+ inset-block-end: var(--drawer-size);
90
+ }
91
+
92
+ &[data-drawer-state='full'] {
93
+ inset-block-end: var(--visual-viewport-height, 100dvh);
94
+ pointer-events: none;
95
+ }
69
96
  }
70
97
  }
71
98
 
@@ -143,6 +170,46 @@
143
170
  }
144
171
  }
145
172
 
173
+ .dx-main-drawer {
174
+ @apply fixed overflow-hidden;
175
+ @apply duration-200 ease-in-out-symmetric;
176
+ @apply border-bs-landmarkLine border-subduedSeparator;
177
+ @apply sidebar-surface backdrop-blur-md dark:backdrop-blur-lg;
178
+ overscroll-behavior: contain;
179
+ touch-action: pan-y;
180
+
181
+ /* Ensure scrollable children contain their scroll. */
182
+ & [class*='overflow-y-auto'],
183
+ & [class*='overflow-auto'] {
184
+ overscroll-behavior-y: contain;
185
+ -webkit-overflow-scrolling: touch;
186
+ }
187
+
188
+ transition-property: inset-block-end, block-size;
189
+ inset-inline-start: 0;
190
+ inset-inline-end: 0;
191
+ z-index: 1;
192
+
193
+ &[data-resizing='false'] {
194
+ @apply duration-200;
195
+ }
196
+
197
+ &[data-state='closed'] {
198
+ block-size: var(--drawer-size);
199
+ inset-block-end: calc(-1 * var(--drawer-size));
200
+ }
201
+
202
+ &[data-state='expanded'] {
203
+ block-size: var(--drawer-size);
204
+ inset-block-end: max(0px, env(safe-area-inset-bottom));
205
+ }
206
+
207
+ &[data-state='full'] {
208
+ block-size: var(--visual-viewport-height, 100dvh);
209
+ inset-block-end: max(0px, env(safe-area-inset-bottom));
210
+ }
211
+ }
212
+
146
213
  .dx-main-overlay {
147
214
  @apply fixed inset-0 bg-scrimSurface;
148
215
  @apply transition-opacity duration-200 ease-in-out-symmetric;
@@ -16,6 +16,7 @@
16
16
  --statusbar-size: theme(spacing.8);
17
17
  --nav-sidebar-size: 22.5rem;
18
18
  --complementary-sidebar-size: 25rem;
19
+ --drawer-size: 50dvh;
19
20
  /* NOTE(thure): 74px (rather than rem) is intentional in order to match the size of macOS windowing controls. */
20
21
  --l0-size: 74px;
21
22
  --l0-avatar-size: 3rem;