@prismicio/editor-ui 0.4.85 → 0.4.86
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/{BarChart-aCr49-ej.js → BarChart-Iorb738F.js} +1 -1
- package/dist/{BarChart-pb8MZQfO.mjs → BarChart-coBghf7p.mjs} +1 -1
- package/dist/components/Toast/Toast.d.ts +1 -1
- package/dist/components/Toast/ToastContext.d.ts +4 -1
- package/dist/{index-4ec4lQBM.mjs → index--BNL6KeN.mjs} +20 -14
- package/dist/{index-sSU6XUZI.js → index-ugT2HujW.js} +2 -2
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as _i, g as et, j as w, t as Fi, d as x1 } from "./index
|
|
1
|
+
import { c as _i, g as et, j as w, t as Fi, d as x1 } from "./index--BNL6KeN.mjs";
|
|
2
2
|
import * as nn from "react";
|
|
3
3
|
import { useEffect as sn, useLayoutEffect as $1, useState as Tn, useRef as Xe, forwardRef as ir, useCallback as Ce, useContext as kn, useMemo as fe, createContext as si, memo as Oe, createElement as an, cloneElement as w1, isValidElement as T1, Fragment as qc } from "react";
|
|
4
4
|
import { unstable_batchedUpdates as M1 } from "react-dom";
|
|
@@ -11,11 +11,14 @@ interface ToastConfig {
|
|
|
11
11
|
icon?: IconName;
|
|
12
12
|
onClick: () => void;
|
|
13
13
|
};
|
|
14
|
+
cancel?: {
|
|
15
|
+
onClick?: () => void;
|
|
16
|
+
};
|
|
14
17
|
icon?: IconName;
|
|
15
18
|
}
|
|
16
19
|
export declare function ToastProvider(props: PropsWithChildren): JSX.Element;
|
|
17
20
|
export declare function useToast(): ToastContextValue;
|
|
18
21
|
interface ToastContextValue {
|
|
19
|
-
showToast: (config: ToastConfig) => void;
|
|
22
|
+
showToast: (config: ToastConfig) => () => void;
|
|
20
23
|
}
|
|
21
24
|
export {};
|
|
@@ -10706,7 +10706,7 @@ function M3e(e) {
|
|
|
10706
10706
|
] }, r)) });
|
|
10707
10707
|
}
|
|
10708
10708
|
const T3e = p6(
|
|
10709
|
-
() => import("./BarChart-
|
|
10709
|
+
() => import("./BarChart-coBghf7p.mjs").then((e) => ({
|
|
10710
10710
|
default: e.BarChart
|
|
10711
10711
|
}))
|
|
10712
10712
|
), EW = "_root_1sq58_1", MW = "_fadeIn_1sq58_1", TW = "_inlinePadding_1sq58_13", AW = "_icon_1sq58_22", PW = "_iconChildren_1sq58_31", RW = "_image_1sq58_85", BW = "_imageFixedHeight_1sq58_89", Wr = {
|
|
@@ -60468,7 +60468,7 @@ const s2e = "_toast_k57go_1", c2e = "_inline_k57go_11 _toast_k57go_1", u2e = "_c
|
|
|
60468
60468
|
function h2e(e) {
|
|
60469
60469
|
const { anchor: t, open: n, title: r, seconds: o, action: a, cancel: i, onOpenChange: l } = e, s = gn(l);
|
|
60470
60470
|
return ie(() => {
|
|
60471
|
-
if (!n || !o)
|
|
60471
|
+
if (!n || !o || o >= Number.MAX_SAFE_INTEGER)
|
|
60472
60472
|
return;
|
|
60473
60473
|
const c = setTimeout(() => {
|
|
60474
60474
|
s(!1);
|
|
@@ -60510,6 +60510,11 @@ function h2e(e) {
|
|
|
60510
60510
|
}
|
|
60511
60511
|
function m2e(e) {
|
|
60512
60512
|
const { icon: t, loadingIndicator: n, title: r, action: o, cancel: a, onOpenChange: i } = e;
|
|
60513
|
+
function l() {
|
|
60514
|
+
if (a != null && a.onClick)
|
|
60515
|
+
return a == null ? void 0 : a.onClick();
|
|
60516
|
+
i == null || i(!1);
|
|
60517
|
+
}
|
|
60513
60518
|
return /* @__PURE__ */ p.jsxs("div", { className: Yl.inline, children: [
|
|
60514
60519
|
/* @__PURE__ */ p.jsxs("div", { className: Yl.content, children: [
|
|
60515
60520
|
!!t && /* @__PURE__ */ p.jsx(be, { name: t, color: "grey11", size: "medium" }),
|
|
@@ -60536,7 +60541,7 @@ function m2e(e) {
|
|
|
60536
60541
|
icon: "close",
|
|
60537
60542
|
size: "medium",
|
|
60538
60543
|
hasPadding: !1,
|
|
60539
|
-
onClick:
|
|
60544
|
+
onClick: l
|
|
60540
60545
|
}
|
|
60541
60546
|
)
|
|
60542
60547
|
] })
|
|
@@ -60545,7 +60550,8 @@ function m2e(e) {
|
|
|
60545
60550
|
function g2e(e) {
|
|
60546
60551
|
const { title: t, subtitle: n, action: r, onOpenChange: o, cancel: a } = e;
|
|
60547
60552
|
function i() {
|
|
60548
|
-
|
|
60553
|
+
var l;
|
|
60554
|
+
(l = a == null ? void 0 : a.onClick) == null || l.call(a), o == null || o(!1);
|
|
60549
60555
|
}
|
|
60550
60556
|
return /* @__PURE__ */ p.jsxs("div", { className: Yl.card, children: [
|
|
60551
60557
|
/* @__PURE__ */ p.jsx("div", { className: Yl.closeButton, children: /* @__PURE__ */ p.jsx(
|
|
@@ -60585,13 +60591,12 @@ function A4e(e) {
|
|
|
60585
60591
|
subtitle: c,
|
|
60586
60592
|
seconds: u,
|
|
60587
60593
|
action: d,
|
|
60588
|
-
|
|
60589
|
-
|
|
60590
|
-
|
|
60594
|
+
cancel: f,
|
|
60595
|
+
icon: h = "check",
|
|
60596
|
+
anchor: g = /* @__PURE__ */ p.jsx(Te, { position: "fixed", bottom: 24, left: 0, width: "100%" })
|
|
60597
|
+
} = n, m = X(
|
|
60591
60598
|
() => ({
|
|
60592
|
-
showToast: (
|
|
60593
|
-
r({ ...b2e, ...m, key: Date.now() }), a(!0);
|
|
60594
|
-
}
|
|
60599
|
+
showToast: (b) => (r({ ...b2e, ...b, key: Date.now() }), a(!0), () => a(!1))
|
|
60595
60600
|
}),
|
|
60596
60601
|
[]
|
|
60597
60602
|
);
|
|
@@ -60600,18 +60605,19 @@ function A4e(e) {
|
|
|
60600
60605
|
h2e,
|
|
60601
60606
|
{
|
|
60602
60607
|
variant: l,
|
|
60603
|
-
anchor:
|
|
60608
|
+
anchor: g,
|
|
60604
60609
|
open: o,
|
|
60605
|
-
icon:
|
|
60610
|
+
icon: h,
|
|
60606
60611
|
title: s,
|
|
60607
60612
|
subtitle: c,
|
|
60608
60613
|
seconds: u,
|
|
60609
60614
|
action: d,
|
|
60615
|
+
cancel: f,
|
|
60610
60616
|
onOpenChange: a
|
|
60611
60617
|
},
|
|
60612
60618
|
i
|
|
60613
60619
|
),
|
|
60614
|
-
/* @__PURE__ */ p.jsx(hA.Provider, { value:
|
|
60620
|
+
/* @__PURE__ */ p.jsx(hA.Provider, { value: m, children: t })
|
|
60615
60621
|
] });
|
|
60616
60622
|
}
|
|
60617
60623
|
const b2e = {
|
|
@@ -60624,7 +60630,7 @@ function P4e() {
|
|
|
60624
60630
|
return e;
|
|
60625
60631
|
}
|
|
60626
60632
|
const hA = Fe({
|
|
60627
|
-
showToast: () => {
|
|
60633
|
+
showToast: () => () => {
|
|
60628
60634
|
}
|
|
60629
60635
|
});
|
|
60630
60636
|
function R4e(e) {
|