@harnessio/ui 0.5.3 → 0.5.5
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/components.d.ts +7 -0
- package/dist/components.js +2 -2
- package/dist/context.d.ts +5 -0
- package/dist/context.js +2 -2
- package/dist/{index-C5GPIKLa.js → index-D6BuUbRP.js} +2 -2
- package/dist/{index-C5GPIKLa.js.map → index-D6BuUbRP.js.map} +1 -1
- package/dist/{index-Dx1dURcv.js → index-DhFGPGOA.js} +759 -754
- package/dist/index-DhFGPGOA.js.map +1 -0
- package/dist/{index-BYKijgj9.js → index-XHrNArJB.js} +39 -37
- package/dist/{index-BYKijgj9.js.map → index-XHrNArJB.js.map} +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +2 -2
- package/package.json +7 -5
- package/dist/index-Dx1dURcv.js.map +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var k$ = Object.defineProperty;
|
|
2
2
|
var P$ = (e, t, n) => t in e ? k$(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var de = (e, t, n) => P$(e, typeof t != "symbol" ? t + "" : t, n);
|
|
4
|
-
import { c as Dt, T as C4, R as Iv, D as Ov, a as Dv, u as Od, C as tg, b as R4, B as Je, I as me, P as wv, d as N4, O as ng, e as xv, S as Xi, f as F$, L as ks, g as U$, h as B$, i as Ts, j as yt, k as Pn, l as Ku, m as Ar, n as Dd, o as Lv, p as Va, q as On, r as yr, s as pt, t as Ir, v as rg, A as Mv, w as kv, x as mi, y as y4, z as A4, E as G$, F as I4, G as O4, H as D4, J as w4, K as x4, M as L4, N as M4, Q as li, U as st, V as vs, W as ji, X as wd, _ as Ve, Y as Cn, Z as k4, $ as va, a0 as ka, a1 as H$, a2 as ag, a3 as Y$, a4 as Ml, a5 as P4, a6 as z$, a7 as V$, a8 as q$, a9 as $$, aa as W$, ab as K$, ac as Q$, ad as X$, ae as j$, af as Z$, ag as J$ } from "./index-
|
|
4
|
+
import { c as Dt, T as C4, R as Iv, D as Ov, a as Dv, u as Od, C as tg, b as R4, B as Je, I as me, P as wv, d as N4, O as ng, e as xv, S as Xi, f as F$, L as ks, g as U$, h as B$, i as Ts, j as yt, k as Pn, l as Ku, m as Ar, n as Dd, o as Lv, p as Va, q as On, r as yr, s as pt, t as Ir, v as rg, A as Mv, w as kv, x as mi, y as y4, z as A4, E as G$, F as I4, G as O4, H as D4, J as w4, K as x4, M as L4, N as M4, Q as li, U as st, V as vs, W as ji, X as wd, _ as Ve, Y as Cn, Z as k4, $ as va, a0 as ka, a1 as H$, a2 as ag, a3 as Y$, a4 as Ml, a5 as P4, a6 as z$, a7 as V$, a8 as q$, a9 as $$, aa as W$, ab as K$, ac as Q$, ad as X$, ae as j$, af as Z$, ag as J$ } from "./index-DhFGPGOA.js";
|
|
5
5
|
import { jsx as g, jsxs as G, Fragment as mt } from "react/jsx-runtime";
|
|
6
6
|
import * as h from "react";
|
|
7
7
|
import se, { forwardRef as ge, useMemo as Me, useLayoutEffect as lc, useEffect as be, createContext as Ut, useContext as ut, useRef as xe, useCallback as Ue, Children as cc, useState as ve, cloneElement as Oo, memo as Ka, useReducer as eW, isValidElement as ra, createElement as tW, Fragment as Vi, useImperativeHandle as Pv } from "react";
|
|
@@ -169368,69 +169368,71 @@ const P3e = ({
|
|
|
169368
169368
|
error: o,
|
|
169369
169369
|
withForm: s = !1,
|
|
169370
169370
|
message: l,
|
|
169371
|
-
|
|
169372
|
-
|
|
169373
|
-
|
|
169374
|
-
|
|
169371
|
+
title: c,
|
|
169372
|
+
deletionItemName: u,
|
|
169373
|
+
deleteConfirmText: d,
|
|
169374
|
+
deletionKeyword: p = "DELETE",
|
|
169375
|
+
violation: m = !1,
|
|
169376
|
+
bypassable: _ = !1
|
|
169375
169377
|
}) => {
|
|
169376
|
-
const { t:
|
|
169377
|
-
|
|
169378
|
-
},
|
|
169379
|
-
s &&
|
|
169380
|
-
},
|
|
169378
|
+
const { t: f } = Pn(), [E, S] = ve(""), [b, T] = ve(!1), v = (I) => {
|
|
169379
|
+
S(I.target.value), b && T(!1);
|
|
169380
|
+
}, R = () => {
|
|
169381
|
+
s && E !== p && T(!0), !(i || s && E !== p) && (T(!1), r(n));
|
|
169382
|
+
}, N = () => {
|
|
169381
169383
|
setTimeout(() => {
|
|
169382
|
-
|
|
169384
|
+
S(""), T(!1);
|
|
169383
169385
|
}, 300), t();
|
|
169384
|
-
},
|
|
169386
|
+
}, y = Me(() => {
|
|
169385
169387
|
if (l) return l;
|
|
169386
|
-
const
|
|
169388
|
+
const I = "__IDENTIFIER__";
|
|
169387
169389
|
if (a) {
|
|
169388
|
-
const
|
|
169390
|
+
const w = f(
|
|
169389
169391
|
"component:deleteDialog.descriptionWithType",
|
|
169390
|
-
`This will permanently delete your ${a} ${
|
|
169391
|
-
{ type: a, identifier:
|
|
169392
|
-
).split(
|
|
169392
|
+
`This will permanently delete your ${a} ${I} and remove all data. This action cannot be undone.`,
|
|
169393
|
+
{ type: a, identifier: I }
|
|
169394
|
+
).split(I);
|
|
169393
169395
|
return /* @__PURE__ */ G(mt, { children: [
|
|
169394
|
-
|
|
169395
|
-
(
|
|
169396
|
-
|
|
169396
|
+
w[0],
|
|
169397
|
+
(u ?? n) && /* @__PURE__ */ g(he, { as: "span", variant: "body-strong", children: u ?? n }),
|
|
169398
|
+
w[1]
|
|
169397
169399
|
] });
|
|
169398
169400
|
}
|
|
169399
|
-
return
|
|
169401
|
+
return f(
|
|
169400
169402
|
"component:deleteDialog.description",
|
|
169401
169403
|
"This will permanently remove all data. This action cannot be undone."
|
|
169402
169404
|
);
|
|
169403
|
-
}, [a,
|
|
169405
|
+
}, [a, f, l, n, u]);
|
|
169404
169406
|
return /* @__PURE__ */ g(
|
|
169405
169407
|
iu.Root,
|
|
169406
169408
|
{
|
|
169407
169409
|
theme: "danger",
|
|
169408
169410
|
open: e,
|
|
169409
|
-
onOpenChange:
|
|
169410
|
-
onConfirm:
|
|
169411
|
+
onOpenChange: N,
|
|
169412
|
+
onConfirm: R,
|
|
169411
169413
|
loading: i,
|
|
169412
|
-
children: /* @__PURE__ */ G(iu.Content, { title:
|
|
169413
|
-
/* @__PURE__ */ g(he, { className: "break-words", wrap: "wrap", children:
|
|
169414
|
+
children: /* @__PURE__ */ G(iu.Content, { title: c ?? f("component:deleteDialog.title", "Are you sure?"), children: [
|
|
169415
|
+
/* @__PURE__ */ g(he, { className: "break-words", wrap: "wrap", children: y }),
|
|
169414
169416
|
s && /* @__PURE__ */ g(
|
|
169415
169417
|
Ap,
|
|
169416
169418
|
{
|
|
169417
169419
|
id: "verification",
|
|
169418
|
-
value:
|
|
169420
|
+
value: E,
|
|
169419
169421
|
placeholder: "",
|
|
169420
|
-
onChange:
|
|
169421
|
-
label: `${
|
|
169422
|
+
onChange: v,
|
|
169423
|
+
label: `${f("component:deleteDialog.inputLabel", "To confirm, type")} "${p}"`,
|
|
169422
169424
|
disabled: i,
|
|
169423
169425
|
autoFocus: !0,
|
|
169424
|
-
error:
|
|
169425
|
-
deletionKeyword:
|
|
169426
|
+
error: b ? f("component:deleteDialog.validation.mismatch", `Please type "${p}" to confirm`, {
|
|
169427
|
+
deletionKeyword: p
|
|
169426
169428
|
}) : ""
|
|
169427
169429
|
}
|
|
169428
169430
|
),
|
|
169429
|
-
|
|
169431
|
+
m && /* @__PURE__ */ g(ju, { theme: ga.ERROR, children: _ ? f(
|
|
169430
169432
|
"component:deleteDialog.violationMessages.bypassed",
|
|
169431
169433
|
`Some rules will be bypassed while deleting ${a}`,
|
|
169432
169434
|
{ type: a }
|
|
169433
|
-
) :
|
|
169435
|
+
) : f("component:deleteDialog.violationMessages.notAllow", `Some rules don't allow you to delete ${a}`, {
|
|
169434
169436
|
type: a
|
|
169435
169437
|
}) }),
|
|
169436
169438
|
!!o && /* @__PURE__ */ G(Ml.Root, { theme: "danger", children: [
|
|
@@ -169438,7 +169440,7 @@ const P3e = ({
|
|
|
169438
169440
|
/* @__PURE__ */ g(Ml.Description, { children: aW(o, "Failed to perform delete operation") })
|
|
169439
169441
|
] }),
|
|
169440
169442
|
/* @__PURE__ */ g(iu.Cancel, {}),
|
|
169441
|
-
/* @__PURE__ */ g(iu.Confirm, { disabled:
|
|
169443
|
+
/* @__PURE__ */ g(iu.Confirm, { disabled: m && !_, children: m && _ ? "Bypass rules and delete" : d || "Yes" })
|
|
169442
169444
|
] })
|
|
169443
169445
|
}
|
|
169444
169446
|
);
|
|
@@ -176180,8 +176182,8 @@ const g$ = ({
|
|
|
176180
176182
|
/* @__PURE__ */ g(Zn.Typography, { className: "w-1/3" }),
|
|
176181
176183
|
/* @__PURE__ */ g(Zn.Typography, { className: "w-2/3" })
|
|
176182
176184
|
] }) : /* @__PURE__ */ G(mt, { children: [
|
|
176183
|
-
/* @__PURE__ */ g(he, { color: "foreground-
|
|
176184
|
-
/* @__PURE__ */ g(he, { color: "foreground-
|
|
176185
|
+
/* @__PURE__ */ g(he, { color: "foreground-1", variant: "body-normal", children: e }),
|
|
176186
|
+
/* @__PURE__ */ g(he, { color: "foreground-3", variant: "body-normal", className: "break-all", children: a })
|
|
176185
176187
|
] }) }, e) : /* @__PURE__ */ g(tt.Grid, { flow: "row", gapX: "2xl", columns: "minmax(0, 200px) minmax(0, 1fr)", align: "start", children: n ? /* @__PURE__ */ G(mt, { children: [
|
|
176186
176188
|
/* @__PURE__ */ g(Zn.Typography, { className: "w-full" }),
|
|
176187
176189
|
/* @__PURE__ */ g(Zn.Typography, { className: "w-2/3" })
|
|
@@ -179533,4 +179535,4 @@ export {
|
|
|
179533
179535
|
Ese as y,
|
|
179534
179536
|
xi as z
|
|
179535
179537
|
};
|
|
179536
|
-
//# sourceMappingURL=index-
|
|
179538
|
+
//# sourceMappingURL=index-XHrNArJB.js.map
|