@gryt/ui 0.17.1 → 0.18.1
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/GrytProvider.d.ts +11 -1
- package/dist/GrytProvider.d.ts.map +1 -1
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +498 -485
- package/dist/index.js.map +1 -1
- package/dist/portalContainer.d.ts +29 -0
- package/dist/portalContainer.d.ts.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Where overlays below this point should render.
|
|
4
|
+
*
|
|
5
|
+
* Base UI portals a popup to `document.body`, which is outside whatever element
|
|
6
|
+
* GrytProvider put the theme variables on. For an app with one theme that is
|
|
7
|
+
* exactly right — the overlay wants the app's theme and it gets it from
|
|
8
|
+
* `:root`. It is wrong only when a second theme is being rendered inside a
|
|
9
|
+
* page: the docs site previews a theme in a panel, and a Select or Tooltip
|
|
10
|
+
* opened inside that panel comes up in the site's own colours (GRYT-242).
|
|
11
|
+
*
|
|
12
|
+
* Deliberately a context rather than a prop on each component. Select carries a
|
|
13
|
+
* long comment about why its popup portals to the body — a popup left inside a
|
|
14
|
+
* positioned dialog lands hundreds of pixels off — and a per-call `container`
|
|
15
|
+
* prop is exactly the thing somebody reaches for to fix a layout problem, which
|
|
16
|
+
* is how that bug got made the first time. A container that is set once, for a
|
|
17
|
+
* subtree, by whoever established the theme, cannot be used that way by
|
|
18
|
+
* accident.
|
|
19
|
+
*
|
|
20
|
+
* Base UI has no equivalent to reuse. Its own `PortalContext` is a boolean —
|
|
21
|
+
* "am I inside a portal" — not a carrier for the container.
|
|
22
|
+
*/
|
|
23
|
+
export declare const PortalContainerContext: import('react').Context<RefObject<HTMLElement | null> | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* The container overlays should portal into, or `undefined` for Base UI's
|
|
26
|
+
* default of `document.body`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function usePortalContainer(): RefObject<HTMLElement | null> | undefined;
|
|
29
|
+
//# sourceMappingURL=portalContainer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"portalContainer.d.ts","sourceRoot":"","sources":["../src/portalContainer.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,sBAAsB,oEAEvB,CAAC;AAEb;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,SAAS,CAE9E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gryt/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.1",
|
|
4
4
|
"description": "React component library for Gryt, the open-source WebRTC voice chat platform.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"react-dom": ">=18.3.0 || >=19.0.0"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@gryt/theme": "^0.
|
|
78
|
+
"@gryt/theme": "^0.6.0",
|
|
79
79
|
"@base-ui/react": "^1.7.0",
|
|
80
80
|
"@phosphor-icons/react": "^2.1.10",
|
|
81
81
|
"clsx": "^2.1.1",
|