@liner-fe/prism 2.8.39 → 2.8.41
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/lib/index.js +31 -9
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -380,7 +380,7 @@ var useToast = /* @__PURE__ */ __name(() => {
|
|
|
380
380
|
import * as React14 from "react";
|
|
381
381
|
import * as ReactDOM3 from "react-dom";
|
|
382
382
|
|
|
383
|
-
// ../../node_modules/@radix-ui/primitive/dist/index.mjs
|
|
383
|
+
// ../../node_modules/@radix-ui/react-toast/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
384
384
|
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
385
385
|
return /* @__PURE__ */ __name(function handleEvent(event) {
|
|
386
386
|
originalEventHandler?.(event);
|
|
@@ -663,6 +663,17 @@ __name(createCollection, "createCollection");
|
|
|
663
663
|
// ../../node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs
|
|
664
664
|
import * as React8 from "react";
|
|
665
665
|
|
|
666
|
+
// ../../node_modules/@radix-ui/react-dismissable-layer/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
667
|
+
function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
668
|
+
return /* @__PURE__ */ __name(function handleEvent(event) {
|
|
669
|
+
originalEventHandler?.(event);
|
|
670
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
671
|
+
return ourEventHandler?.(event);
|
|
672
|
+
}
|
|
673
|
+
}, "handleEvent");
|
|
674
|
+
}
|
|
675
|
+
__name(composeEventHandlers2, "composeEventHandlers");
|
|
676
|
+
|
|
666
677
|
// ../../node_modules/@radix-ui/react-primitive/dist/index.mjs
|
|
667
678
|
import * as React5 from "react";
|
|
668
679
|
import * as ReactDOM from "react-dom";
|
|
@@ -829,9 +840,9 @@ var DismissableLayer = React8.forwardRef(
|
|
|
829
840
|
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
830
841
|
...props.style
|
|
831
842
|
},
|
|
832
|
-
onFocusCapture:
|
|
833
|
-
onBlurCapture:
|
|
834
|
-
onPointerDownCapture:
|
|
843
|
+
onFocusCapture: composeEventHandlers2(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
844
|
+
onBlurCapture: composeEventHandlers2(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
845
|
+
onPointerDownCapture: composeEventHandlers2(
|
|
835
846
|
props.onPointerDownCapture,
|
|
836
847
|
pointerDownOutside.onPointerDownCapture
|
|
837
848
|
)
|
|
@@ -4341,6 +4352,17 @@ var Logo = /* @__PURE__ */ __name((props) => {
|
|
|
4341
4352
|
// ../../node_modules/@radix-ui/react-popover/dist/index.mjs
|
|
4342
4353
|
import * as React35 from "react";
|
|
4343
4354
|
|
|
4355
|
+
// ../../node_modules/@radix-ui/react-popover/node_modules/@radix-ui/primitive/dist/index.mjs
|
|
4356
|
+
function composeEventHandlers3(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
4357
|
+
return /* @__PURE__ */ __name(function handleEvent(event) {
|
|
4358
|
+
originalEventHandler?.(event);
|
|
4359
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
4360
|
+
return ourEventHandler?.(event);
|
|
4361
|
+
}
|
|
4362
|
+
}, "handleEvent");
|
|
4363
|
+
}
|
|
4364
|
+
__name(composeEventHandlers3, "composeEventHandlers");
|
|
4365
|
+
|
|
4344
4366
|
// ../../node_modules/@radix-ui/react-focus-guards/dist/index.mjs
|
|
4345
4367
|
import * as React18 from "react";
|
|
4346
4368
|
var count = 0;
|
|
@@ -7730,7 +7752,7 @@ var PopoverTrigger2 = React35.forwardRef(
|
|
|
7730
7752
|
"data-state": getState(context.open),
|
|
7731
7753
|
...triggerProps,
|
|
7732
7754
|
ref: composedTriggerRef,
|
|
7733
|
-
onClick:
|
|
7755
|
+
onClick: composeEventHandlers3(props.onClick, context.onOpenToggle)
|
|
7734
7756
|
}
|
|
7735
7757
|
);
|
|
7736
7758
|
return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx40(Anchor, { asChild: true, ...popperScope, children: trigger });
|
|
@@ -7775,11 +7797,11 @@ var PopoverContentModal = React35.forwardRef(
|
|
|
7775
7797
|
ref: composedRefs,
|
|
7776
7798
|
trapFocus: context.open,
|
|
7777
7799
|
disableOutsidePointerEvents: true,
|
|
7778
|
-
onCloseAutoFocus:
|
|
7800
|
+
onCloseAutoFocus: composeEventHandlers3(props.onCloseAutoFocus, (event) => {
|
|
7779
7801
|
event.preventDefault();
|
|
7780
7802
|
if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();
|
|
7781
7803
|
}),
|
|
7782
|
-
onPointerDownOutside:
|
|
7804
|
+
onPointerDownOutside: composeEventHandlers3(
|
|
7783
7805
|
props.onPointerDownOutside,
|
|
7784
7806
|
(event) => {
|
|
7785
7807
|
const originalEvent = event.detail.originalEvent;
|
|
@@ -7789,7 +7811,7 @@ var PopoverContentModal = React35.forwardRef(
|
|
|
7789
7811
|
},
|
|
7790
7812
|
{ checkForDefaultPrevented: false }
|
|
7791
7813
|
),
|
|
7792
|
-
onFocusOutside:
|
|
7814
|
+
onFocusOutside: composeEventHandlers3(
|
|
7793
7815
|
props.onFocusOutside,
|
|
7794
7816
|
(event) => event.preventDefault(),
|
|
7795
7817
|
{ checkForDefaultPrevented: false }
|
|
@@ -7912,7 +7934,7 @@ var PopoverClose = React35.forwardRef(
|
|
|
7912
7934
|
type: "button",
|
|
7913
7935
|
...closeProps,
|
|
7914
7936
|
ref: forwardedRef,
|
|
7915
|
-
onClick:
|
|
7937
|
+
onClick: composeEventHandlers3(props.onClick, () => context.onOpenChange(false))
|
|
7916
7938
|
}
|
|
7917
7939
|
);
|
|
7918
7940
|
}
|