@middag-io/react 0.35.2 → 0.35.3
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-lib/{DateField-CcRD2r-Z.js → DateField-CryguepA.js} +1 -1
- package/dist-lib/{DocumentField-DjnK9T7o.js → DocumentField-4wTGkMH-.js} +2 -2
- package/dist-lib/{FormPanelBlock-BYyMr-xN.js → FormPanelBlock-CbM3PiH7.js} +4 -4
- package/dist-lib/{MarkdownContent-C-X2QGA2.js → MarkdownContent-D0w3DYm6.js} +16 -16
- package/dist-lib/{PhoneField-BF70G_PS.js → PhoneField-BtLI699n.js} +2 -2
- package/dist-lib/{combobox-BRe2Y-kB.js → combobox-oPnHtaA6.js} +1857 -1772
- package/dist-lib/middag-react.js +2243 -3701
- package/dist-lib/{resolve-field-error-DLX1h_6J.js → resolve-field-error-DbMTg4Lj.js} +26 -26
- package/dist-lib/useTranslation-D-tjJhTn.js +48 -0
- package/package.json +1 -1
- package/dist-lib/MarkdownContent-D5FIjx_W.js +0 -2
- package/dist-lib/useTranslation-BuyMWJ9T.js +0 -321
- /package/dist-lib/{DateRangeField-DKZMfKB2.js → DateRangeField-o5tUrAR8.js} +0 -0
- /package/dist-lib/{dist-DdfRh_k3.js → dist-axU0pUop.js} +0 -0
- /package/dist-lib/{document-validation-DX0fB9cu.js → document-validation-BSjTDZhG.js} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as e } from "./button-Bm0X9WO5.js";
|
|
2
2
|
import { i as t, o as n, s as r, t as i } from "./calendar-CucaItjm.js";
|
|
3
|
-
import { t as a } from "./useTranslation-
|
|
3
|
+
import { t as a } from "./useTranslation-D-tjJhTn.js";
|
|
4
4
|
import { n as o, r as s, t as c } from "./popover-BaiQ-JSz.js";
|
|
5
5
|
import { t as l } from "./input-BC9whKEm.js";
|
|
6
6
|
import { useCallback as u, useState as d } from "react";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { t as e } from "./useTranslation-
|
|
1
|
+
import { t as e } from "./useTranslation-D-tjJhTn.js";
|
|
2
2
|
import { t } from "./input-BC9whKEm.js";
|
|
3
|
-
import "./document-validation-
|
|
3
|
+
import "./document-validation-BSjTDZhG.js";
|
|
4
4
|
import { useCallback as n, useMemo as r } from "react";
|
|
5
5
|
import { jsx as i } from "react/jsx-runtime";
|
|
6
6
|
//#region src/base/form/fields/DocumentField.tsx
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { $ as e, A as t, D as n, Dt as r, E as i, Et as a, Ft as o, J as s, K as c, Nt as l, O as u, Ot as d, Pt as f, T as p, Tt as m, U as h, V as g, Y as _, Z as v, _ as y, a as b, at as x, b as S, c as C, d as ee, et as w, f as T, g as E, h as D, i as O, jt as k, kt as A, l as te, m as ne, n as re, nt as ie, o as ae, p as oe, r as se, t as j, tt as ce, u as le, v as ue, w as de, wt as fe, y as pe } from "./resolve-field-error-
|
|
1
|
+
import { $ as e, A as t, D as n, Dt as r, E as i, Et as a, Ft as o, J as s, K as c, Nt as l, O as u, Ot as d, Pt as f, T as p, Tt as m, U as h, V as g, Y as _, Z as v, _ as y, a as b, at as x, b as S, c as C, d as ee, et as w, f as T, g as E, h as D, i as O, jt as k, kt as A, l as te, m as ne, n as re, nt as ie, o as ae, p as oe, r as se, t as j, tt as ce, u as le, v as ue, w as de, wt as fe, y as pe } from "./resolve-field-error-DbMTg4Lj.js";
|
|
2
2
|
import { t as me } from "./button-Bm0X9WO5.js";
|
|
3
|
-
import { t as he } from "./useTranslation-
|
|
3
|
+
import { t as he } from "./useTranslation-D-tjJhTn.js";
|
|
4
4
|
import { t as ge } from "./utils-CpaZ5_iF.js";
|
|
5
5
|
import { t as _e } from "./skeleton-xL_Hzxj-.js";
|
|
6
6
|
import M, { Suspense as N, lazy as P, useCallback as ve, useEffect as ye, useId as be, useMemo as F, useRef as xe, useState as Se } from "react";
|
|
@@ -1283,7 +1283,7 @@ function Yt(e, t, n) {
|
|
|
1283
1283
|
}
|
|
1284
1284
|
case "document": {
|
|
1285
1285
|
let e = o.documentType ?? "generic", n = o.documentScope ?? "any", r = k(), i = async (t) => {
|
|
1286
|
-
let { isValidDocument: r } = await import("./document-validation-
|
|
1286
|
+
let { isValidDocument: r } = await import("./document-validation-BSjTDZhG.js");
|
|
1287
1287
|
return r(t, e, n);
|
|
1288
1288
|
};
|
|
1289
1289
|
return c ? r.min(1, t("middag.ui.validation.required")).refine(i, t("middag.ui.validation.document_invalid")) : r.refine(async (e) => e === "" || await i(e), t("middag.ui.validation.document_invalid"));
|
|
@@ -1298,7 +1298,7 @@ function Xt(e, t, n) {
|
|
|
1298
1298
|
}
|
|
1299
1299
|
//#endregion
|
|
1300
1300
|
//#region src/base/form/FormField.tsx
|
|
1301
|
-
var Zt = P(() => import("./PhoneField-
|
|
1301
|
+
var Zt = P(() => import("./PhoneField-BtLI699n.js").then((e) => ({ default: e.PhoneField }))), Qt = P(() => import("./DateField-CryguepA.js").then((e) => ({ default: e.DateField }))), $t = P(() => import("./DocumentField-4wTGkMH-.js").then((e) => ({ default: e.DocumentField }))), en = P(() => import("./DateRangeField-o5tUrAR8.js").then((e) => ({ default: e.DateRangeField })));
|
|
1302
1302
|
function tn() {
|
|
1303
1303
|
return /* @__PURE__ */ I(_e, { className: "h-9 w-full rounded-md" });
|
|
1304
1304
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { i as e, n as t, t as n } from "./chunk-DeC0fbbY.js";
|
|
2
|
-
import { t as r } from "./useTranslation-
|
|
2
|
+
import { t as r } from "./useTranslation-D-tjJhTn.js";
|
|
3
3
|
import { N as i, ht as a, t as o } from "./HugeiconsIcon-CKqc2W1S.js";
|
|
4
4
|
import { t as s } from "./utils-CpaZ5_iF.js";
|
|
5
5
|
import { t as c } from "./skeleton-xL_Hzxj-.js";
|
|
@@ -13319,7 +13319,7 @@ function sl(e) {
|
|
|
13319
13319
|
}
|
|
13320
13320
|
//#endregion
|
|
13321
13321
|
//#region src/base/partials/MarkdownContent/index.tsx
|
|
13322
|
-
var cl = {
|
|
13322
|
+
var cl = /* @__PURE__ */ t({ MarkdownContent: () => hl }), ll = {
|
|
13323
13323
|
...Wc,
|
|
13324
13324
|
tagNames: (Wc.tagNames ?? []).filter((e) => e !== "script" && e !== "style"),
|
|
13325
13325
|
attributes: {
|
|
@@ -13328,7 +13328,7 @@ var cl = {
|
|
|
13328
13328
|
span: [...Wc.attributes?.span ?? [], "className"]
|
|
13329
13329
|
}
|
|
13330
13330
|
};
|
|
13331
|
-
function
|
|
13331
|
+
function ul({ code: e }) {
|
|
13332
13332
|
let { t } = r(), [n, c] = u(!1);
|
|
13333
13333
|
return /* @__PURE__ */ f("button", {
|
|
13334
13334
|
type: "button",
|
|
@@ -13344,17 +13344,17 @@ function ll({ code: e }) {
|
|
|
13344
13344
|
})
|
|
13345
13345
|
});
|
|
13346
13346
|
}
|
|
13347
|
-
function
|
|
13347
|
+
function dl(e) {
|
|
13348
13348
|
try {
|
|
13349
13349
|
return new URL(e, window.location.origin).origin !== window.location.origin;
|
|
13350
13350
|
} catch {
|
|
13351
13351
|
return !1;
|
|
13352
13352
|
}
|
|
13353
13353
|
}
|
|
13354
|
-
function
|
|
13355
|
-
return typeof e == "string" ? e : Array.isArray(e) ? e.map(
|
|
13354
|
+
function fl(e) {
|
|
13355
|
+
return typeof e == "string" ? e : Array.isArray(e) ? e.map(fl).join("") : e && typeof e == "object" && "props" in e ? fl(e.props?.children) : String(e ?? "");
|
|
13356
13356
|
}
|
|
13357
|
-
var
|
|
13357
|
+
var pl = {
|
|
13358
13358
|
h1: ({ children: e, ...t }) => /* @__PURE__ */ f("h1", {
|
|
13359
13359
|
className: "text-foreground mt-6 mb-4 text-2xl font-bold first:mt-0",
|
|
13360
13360
|
...t,
|
|
@@ -13404,7 +13404,7 @@ var fl = {
|
|
|
13404
13404
|
className: "border-border my-6",
|
|
13405
13405
|
...e
|
|
13406
13406
|
}),
|
|
13407
|
-
a: ({ href: e, children: t, ...n }) => e ?
|
|
13407
|
+
a: ({ href: e, children: t, ...n }) => e ? dl(e) ? /* @__PURE__ */ f("a", {
|
|
13408
13408
|
href: e,
|
|
13409
13409
|
target: "_blank",
|
|
13410
13410
|
rel: "noopener noreferrer",
|
|
@@ -13424,14 +13424,14 @@ var fl = {
|
|
|
13424
13424
|
children: t
|
|
13425
13425
|
}),
|
|
13426
13426
|
pre: ({ children: e, ...t }) => {
|
|
13427
|
-
let n =
|
|
13427
|
+
let n = fl(e);
|
|
13428
13428
|
return /* @__PURE__ */ p("div", {
|
|
13429
13429
|
className: "group/codeblock relative mb-4",
|
|
13430
13430
|
children: [/* @__PURE__ */ f("pre", {
|
|
13431
13431
|
className: "overflow-x-auto rounded-lg bg-zinc-900 p-4 text-sm text-zinc-100 dark:bg-zinc-950",
|
|
13432
13432
|
...t,
|
|
13433
13433
|
children: e
|
|
13434
|
-
}), /* @__PURE__ */ f(
|
|
13434
|
+
}), /* @__PURE__ */ f(ul, { code: n })]
|
|
13435
13435
|
});
|
|
13436
13436
|
},
|
|
13437
13437
|
code: ({ className: e, children: t, ...n }) => e ? /* @__PURE__ */ f("code", {
|
|
@@ -13474,7 +13474,7 @@ var fl = {
|
|
|
13474
13474
|
children: e
|
|
13475
13475
|
})
|
|
13476
13476
|
};
|
|
13477
|
-
function
|
|
13477
|
+
function ml() {
|
|
13478
13478
|
return /* @__PURE__ */ p("div", {
|
|
13479
13479
|
className: "max-w-[720px] space-y-3",
|
|
13480
13480
|
children: [
|
|
@@ -13485,9 +13485,9 @@ function pl() {
|
|
|
13485
13485
|
]
|
|
13486
13486
|
});
|
|
13487
13487
|
}
|
|
13488
|
-
function
|
|
13488
|
+
function hl({ content: e, maxHeight: t, isLoading: n }) {
|
|
13489
13489
|
let { t: i } = r();
|
|
13490
|
-
return n ? /* @__PURE__ */ f(
|
|
13490
|
+
return n ? /* @__PURE__ */ f(ml, {}) : !e || e.trim().length === 0 ? /* @__PURE__ */ f("div", {
|
|
13491
13491
|
className: "max-w-[720px]",
|
|
13492
13492
|
children: /* @__PURE__ */ f("p", {
|
|
13493
13493
|
className: "text-muted-foreground text-sm italic",
|
|
@@ -13497,11 +13497,11 @@ function ml({ content: e, maxHeight: t, isLoading: n }) {
|
|
|
13497
13497
|
className: s("prose-reset max-w-[720px]", t && "overflow-y-auto"),
|
|
13498
13498
|
style: t ? { maxHeight: `${t}px` } : void 0,
|
|
13499
13499
|
children: /* @__PURE__ */ f(no, {
|
|
13500
|
-
rehypePlugins: [Vc, [sl,
|
|
13501
|
-
components:
|
|
13500
|
+
rehypePlugins: [Vc, [sl, ll]],
|
|
13501
|
+
components: pl,
|
|
13502
13502
|
children: e
|
|
13503
13503
|
})
|
|
13504
13504
|
});
|
|
13505
13505
|
}
|
|
13506
13506
|
//#endregion
|
|
13507
|
-
export {
|
|
13507
|
+
export { cl as n, h as r, hl as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as e, t } from "./chunk-DeC0fbbY.js";
|
|
2
2
|
import { t as n } from "./button-Bm0X9WO5.js";
|
|
3
|
-
import { f as r, h as i, l as a, m as o, o as s, p as c, s as l, t as u, u as d } from "./combobox-
|
|
4
|
-
import { t as f } from "./useTranslation-
|
|
3
|
+
import { f as r, h as i, l as a, m as o, o as s, p as c, s as l, t as u, u as d } from "./combobox-oPnHtaA6.js";
|
|
4
|
+
import { t as f } from "./useTranslation-D-tjJhTn.js";
|
|
5
5
|
import { t as p, z as m } from "./HugeiconsIcon-CKqc2W1S.js";
|
|
6
6
|
import { t as h } from "./utils-CpaZ5_iF.js";
|
|
7
7
|
import { t as g } from "./scroll-area-D94_a2-1.js";
|