design-zystem 1.0.433 → 1.0.434
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/ui/index.js +19 -3
- package/dist/ui/index.mjs +19 -3
- package/package.json +2 -1
package/dist/ui/index.js
CHANGED
|
@@ -2266,6 +2266,7 @@ var Tabs = ({
|
|
|
2266
2266
|
// src/ui/components/ui/Modal.tsx
|
|
2267
2267
|
var import_react23 = require("react");
|
|
2268
2268
|
var RadixDialog = __toESM(require("@radix-ui/react-dialog"));
|
|
2269
|
+
var import_react_dismissable_layer = require("@radix-ui/react-dismissable-layer");
|
|
2269
2270
|
|
|
2270
2271
|
// src/ui/lib/layers.ts
|
|
2271
2272
|
var MODAL_LAYER = "z-[1000]";
|
|
@@ -2369,6 +2370,8 @@ var Modal = ({
|
|
|
2369
2370
|
const lastPointRef = (0, import_react23.useRef)({ x: 0, y: 0 });
|
|
2370
2371
|
const contentRef = (0, import_react23.useRef)(null);
|
|
2371
2372
|
const overlayRef = (0, import_react23.useRef)(null);
|
|
2373
|
+
const markOverlaySurface = (0, import_react_dismissable_layer.useDismissableLayerSurface)();
|
|
2374
|
+
const markContentSurface = (0, import_react_dismissable_layer.useDismissableLayerSurface)();
|
|
2372
2375
|
useAllowPortalScroll(open, contentRef, overlayRef);
|
|
2373
2376
|
useKeepLayersAboveUsable(open, contentRef);
|
|
2374
2377
|
(0, import_react23.useEffect)(() => {
|
|
@@ -2406,7 +2409,10 @@ var Modal = ({
|
|
|
2406
2409
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2407
2410
|
RadixDialog.Overlay,
|
|
2408
2411
|
{
|
|
2409
|
-
ref:
|
|
2412
|
+
ref: (node) => {
|
|
2413
|
+
overlayRef.current = node;
|
|
2414
|
+
markOverlaySurface(node);
|
|
2415
|
+
},
|
|
2410
2416
|
"data-drawer-keep-open": true,
|
|
2411
2417
|
onClick: (event) => event.stopPropagation(),
|
|
2412
2418
|
className: cn(
|
|
@@ -2420,7 +2426,10 @@ var Modal = ({
|
|
|
2420
2426
|
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
2421
2427
|
RadixDialog.Content,
|
|
2422
2428
|
{
|
|
2423
|
-
ref:
|
|
2429
|
+
ref: (node) => {
|
|
2430
|
+
contentRef.current = node;
|
|
2431
|
+
markContentSurface(node);
|
|
2432
|
+
},
|
|
2424
2433
|
onOpenAutoFocus,
|
|
2425
2434
|
onInteractOutside: (event) => {
|
|
2426
2435
|
if (isMountedAbove(event.target, contentRef.current))
|
|
@@ -5323,6 +5332,7 @@ var CollapsibleContent = (_a) => {
|
|
|
5323
5332
|
var import_react33 = require("react");
|
|
5324
5333
|
var import_vaul = require("vaul");
|
|
5325
5334
|
var DialogPrimitive = __toESM(require("@radix-ui/react-dialog"));
|
|
5335
|
+
var import_react_dismissable_layer2 = require("@radix-ui/react-dismissable-layer");
|
|
5326
5336
|
|
|
5327
5337
|
// src/ui/lib/drawer/nestedDrawerAttributes.ts
|
|
5328
5338
|
var NESTED_DRAWER_ATTRIBUTES = {
|
|
@@ -5413,6 +5423,8 @@ var Drawer = ({
|
|
|
5413
5423
|
const contentRef = (0, import_react33.useRef)(null);
|
|
5414
5424
|
const [panel, setPanel] = (0, import_react33.useState)(null);
|
|
5415
5425
|
const overlayRef = (0, import_react33.useRef)(null);
|
|
5426
|
+
const markOverlaySurface = (0, import_react_dismissable_layer2.useDismissableLayerSurface)();
|
|
5427
|
+
const markContentSurface = (0, import_react_dismissable_layer2.useDismissableLayerSurface)();
|
|
5416
5428
|
useAllowPortalScroll(modal && open, contentRef, overlayRef);
|
|
5417
5429
|
useKeepLayersAboveUsable(modal && open, contentRef);
|
|
5418
5430
|
(0, import_react33.useEffect)(() => {
|
|
@@ -5461,7 +5473,10 @@ var Drawer = ({
|
|
|
5461
5473
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
5462
5474
|
import_vaul.Drawer.Overlay,
|
|
5463
5475
|
{
|
|
5464
|
-
ref:
|
|
5476
|
+
ref: (node) => {
|
|
5477
|
+
overlayRef.current = node;
|
|
5478
|
+
markOverlaySurface(node);
|
|
5479
|
+
},
|
|
5465
5480
|
onClick: (event) => event.stopPropagation(),
|
|
5466
5481
|
className: cn(
|
|
5467
5482
|
MODAL_LAYER,
|
|
@@ -5476,6 +5491,7 @@ var Drawer = ({
|
|
|
5476
5491
|
ref: (node) => {
|
|
5477
5492
|
contentRef.current = node;
|
|
5478
5493
|
setPanel(node);
|
|
5494
|
+
markContentSurface(node);
|
|
5479
5495
|
}
|
|
5480
5496
|
}, { [NESTED_DRAWER_ATTRIBUTES.panel]: "" }), {
|
|
5481
5497
|
onPointerDownOutside: (event) => {
|
package/dist/ui/index.mjs
CHANGED
|
@@ -2058,6 +2058,7 @@ import {
|
|
|
2058
2058
|
useState as useState3
|
|
2059
2059
|
} from "react";
|
|
2060
2060
|
import * as RadixDialog from "@radix-ui/react-dialog";
|
|
2061
|
+
import { useDismissableLayerSurface } from "@radix-ui/react-dismissable-layer";
|
|
2061
2062
|
|
|
2062
2063
|
// src/ui/lib/layers.ts
|
|
2063
2064
|
var MODAL_LAYER = "z-[1000]";
|
|
@@ -2161,6 +2162,8 @@ var Modal = ({
|
|
|
2161
2162
|
const lastPointRef = useRef3({ x: 0, y: 0 });
|
|
2162
2163
|
const contentRef = useRef3(null);
|
|
2163
2164
|
const overlayRef = useRef3(null);
|
|
2165
|
+
const markOverlaySurface = useDismissableLayerSurface();
|
|
2166
|
+
const markContentSurface = useDismissableLayerSurface();
|
|
2164
2167
|
useAllowPortalScroll(open, contentRef, overlayRef);
|
|
2165
2168
|
useKeepLayersAboveUsable(open, contentRef);
|
|
2166
2169
|
useEffect5(() => {
|
|
@@ -2198,7 +2201,10 @@ var Modal = ({
|
|
|
2198
2201
|
/* @__PURE__ */ jsx28(
|
|
2199
2202
|
RadixDialog.Overlay,
|
|
2200
2203
|
{
|
|
2201
|
-
ref:
|
|
2204
|
+
ref: (node) => {
|
|
2205
|
+
overlayRef.current = node;
|
|
2206
|
+
markOverlaySurface(node);
|
|
2207
|
+
},
|
|
2202
2208
|
"data-drawer-keep-open": true,
|
|
2203
2209
|
onClick: (event) => event.stopPropagation(),
|
|
2204
2210
|
className: cn(
|
|
@@ -2212,7 +2218,10 @@ var Modal = ({
|
|
|
2212
2218
|
/* @__PURE__ */ jsx28(
|
|
2213
2219
|
RadixDialog.Content,
|
|
2214
2220
|
{
|
|
2215
|
-
ref:
|
|
2221
|
+
ref: (node) => {
|
|
2222
|
+
contentRef.current = node;
|
|
2223
|
+
markContentSurface(node);
|
|
2224
|
+
},
|
|
2216
2225
|
onOpenAutoFocus,
|
|
2217
2226
|
onInteractOutside: (event) => {
|
|
2218
2227
|
if (isMountedAbove(event.target, contentRef.current))
|
|
@@ -5126,6 +5135,7 @@ var CollapsibleContent = (_a) => {
|
|
|
5126
5135
|
import { useEffect as useEffect7, useRef as useRef9, useState as useState9 } from "react";
|
|
5127
5136
|
import { Drawer as VaulDrawer } from "vaul";
|
|
5128
5137
|
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
5138
|
+
import { useDismissableLayerSurface as useDismissableLayerSurface2 } from "@radix-ui/react-dismissable-layer";
|
|
5129
5139
|
|
|
5130
5140
|
// src/ui/lib/drawer/nestedDrawerAttributes.ts
|
|
5131
5141
|
var NESTED_DRAWER_ATTRIBUTES = {
|
|
@@ -5216,6 +5226,8 @@ var Drawer = ({
|
|
|
5216
5226
|
const contentRef = useRef9(null);
|
|
5217
5227
|
const [panel, setPanel] = useState9(null);
|
|
5218
5228
|
const overlayRef = useRef9(null);
|
|
5229
|
+
const markOverlaySurface = useDismissableLayerSurface2();
|
|
5230
|
+
const markContentSurface = useDismissableLayerSurface2();
|
|
5219
5231
|
useAllowPortalScroll(modal && open, contentRef, overlayRef);
|
|
5220
5232
|
useKeepLayersAboveUsable(modal && open, contentRef);
|
|
5221
5233
|
useEffect7(() => {
|
|
@@ -5264,7 +5276,10 @@ var Drawer = ({
|
|
|
5264
5276
|
/* @__PURE__ */ jsx67(
|
|
5265
5277
|
VaulDrawer.Overlay,
|
|
5266
5278
|
{
|
|
5267
|
-
ref:
|
|
5279
|
+
ref: (node) => {
|
|
5280
|
+
overlayRef.current = node;
|
|
5281
|
+
markOverlaySurface(node);
|
|
5282
|
+
},
|
|
5268
5283
|
onClick: (event) => event.stopPropagation(),
|
|
5269
5284
|
className: cn(
|
|
5270
5285
|
MODAL_LAYER,
|
|
@@ -5279,6 +5294,7 @@ var Drawer = ({
|
|
|
5279
5294
|
ref: (node) => {
|
|
5280
5295
|
contentRef.current = node;
|
|
5281
5296
|
setPanel(node);
|
|
5297
|
+
markContentSurface(node);
|
|
5282
5298
|
}
|
|
5283
5299
|
}, { [NESTED_DRAWER_ATTRIBUTES.panel]: "" }), {
|
|
5284
5300
|
onPointerDownOutside: (event) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "design-zystem",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.434",
|
|
4
4
|
"description": "A React design system of importable components",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"@radix-ui/react-checkbox": "^1.1.4",
|
|
45
45
|
"@radix-ui/react-collapsible": "^1.1.2",
|
|
46
46
|
"@radix-ui/react-dialog": "^1.1.6",
|
|
47
|
+
"@radix-ui/react-dismissable-layer": "^1.1.19",
|
|
47
48
|
"@radix-ui/react-label": "^2.1.1",
|
|
48
49
|
"@radix-ui/react-popover": "^1.1.5",
|
|
49
50
|
"@radix-ui/react-progress": "^1.1.1",
|