@webority/ui-react 0.9.18 → 0.9.19
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.
|
@@ -19,9 +19,11 @@
|
|
|
19
19
|
* click and Escape no longer close the dialog.
|
|
20
20
|
* @param {'center'|'top'} [props.placement='center'] Vertical placement of the card,
|
|
21
21
|
* forwarded to AppModal — centred (default) or pinned near the top.
|
|
22
|
+
* @param {'sm'|'md'|'lg'|'xl'|number} [props.size='md'] Card width, forwarded to AppModal —
|
|
23
|
+
* a preset, or an exact max-width in px for a custom size.
|
|
22
24
|
* @param {string} [props.className] Merged with the dialog's own wui-confirm class.
|
|
23
25
|
*/
|
|
24
|
-
export default function AppConfirmDialog({ open, title, message, confirmLabel, cancelLabel, danger, tone, confirmPhrase, onConfirm, onClose, loading, staticBackdrop, placement, className, ...rest }: {
|
|
26
|
+
export default function AppConfirmDialog({ open, title, message, confirmLabel, cancelLabel, danger, tone, confirmPhrase, onConfirm, onClose, loading, staticBackdrop, placement, size, className, ...rest }: {
|
|
25
27
|
open: boolean;
|
|
26
28
|
title: string;
|
|
27
29
|
message?: import('react').ReactNode;
|
|
@@ -35,5 +37,6 @@ export default function AppConfirmDialog({ open, title, message, confirmLabel, c
|
|
|
35
37
|
loading?: boolean;
|
|
36
38
|
staticBackdrop?: boolean;
|
|
37
39
|
placement?: 'center' | 'top';
|
|
40
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | number;
|
|
38
41
|
className?: string;
|
|
39
42
|
}): import("react").JSX.Element;
|
package/dist/ui-react.js
CHANGED
|
@@ -6342,34 +6342,35 @@ var nr = (e) => function({ size: t = 72 }) {
|
|
|
6342
6342
|
};
|
|
6343
6343
|
//#endregion
|
|
6344
6344
|
//#region src/components/AppConfirmDialog.jsx
|
|
6345
|
-
function ir({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancelLabel: i = "Cancel", danger: a = !1, tone: s, confirmPhrase: c, onConfirm: l, onClose: u, loading: f = !1, staticBackdrop: p = !1, placement: m = "center",
|
|
6346
|
-
I("AppConfirmDialog",
|
|
6347
|
-
let [
|
|
6345
|
+
function ir({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancelLabel: i = "Cancel", danger: a = !1, tone: s, confirmPhrase: c, onConfirm: l, onClose: u, loading: f = !1, staticBackdrop: p = !1, placement: m = "center", size: h = "md", className: g = "", ..._ }) {
|
|
6346
|
+
I("AppConfirmDialog", _);
|
|
6347
|
+
let [v, y] = d("");
|
|
6348
6348
|
if (o(() => {
|
|
6349
|
-
e ||
|
|
6349
|
+
e || y("");
|
|
6350
6350
|
}, [e]), !e) return null;
|
|
6351
|
-
let
|
|
6351
|
+
let b = !!c && v.trim() !== c, x = rr[s || (a ? "delete" : "info")], S = () => {
|
|
6352
6352
|
f || u?.();
|
|
6353
6353
|
};
|
|
6354
6354
|
return /* @__PURE__ */ T(tr, {
|
|
6355
|
-
...
|
|
6355
|
+
..._,
|
|
6356
6356
|
open: e,
|
|
6357
6357
|
hideHeader: !0,
|
|
6358
6358
|
title: t,
|
|
6359
|
-
onClose:
|
|
6359
|
+
onClose: S,
|
|
6360
6360
|
staticBackdrop: p,
|
|
6361
6361
|
placement: m,
|
|
6362
|
-
|
|
6362
|
+
size: h,
|
|
6363
|
+
className: ["wui-confirm", g].filter(Boolean).join(" "),
|
|
6363
6364
|
footer: /* @__PURE__ */ E("div", {
|
|
6364
6365
|
className: "wui-confirm-actions",
|
|
6365
6366
|
children: [/* @__PURE__ */ T(ke, {
|
|
6366
6367
|
variant: "secondary",
|
|
6367
6368
|
disabled: f,
|
|
6368
|
-
onClick:
|
|
6369
|
+
onClick: S,
|
|
6369
6370
|
children: i
|
|
6370
6371
|
}), /* @__PURE__ */ T(ke, {
|
|
6371
6372
|
variant: a ? "danger" : "primary",
|
|
6372
|
-
disabled:
|
|
6373
|
+
disabled: b,
|
|
6373
6374
|
loading: f,
|
|
6374
6375
|
onClick: l,
|
|
6375
6376
|
children: r
|
|
@@ -6378,9 +6379,9 @@ function ir({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
6378
6379
|
children: /* @__PURE__ */ E("div", {
|
|
6379
6380
|
className: "wui-confirm-content",
|
|
6380
6381
|
children: [
|
|
6381
|
-
|
|
6382
|
+
x && /* @__PURE__ */ T("span", {
|
|
6382
6383
|
className: "wui-confirm-icon",
|
|
6383
|
-
children: /* @__PURE__ */ T(
|
|
6384
|
+
children: /* @__PURE__ */ T(x, { size: 80 })
|
|
6384
6385
|
}),
|
|
6385
6386
|
/* @__PURE__ */ T("h3", {
|
|
6386
6387
|
className: "wui-confirm-title",
|
|
@@ -6399,8 +6400,8 @@ function ir({ open: e, title: t, message: n, confirmLabel: r = "Confirm", cancel
|
|
|
6399
6400
|
/* @__PURE__ */ T("strong", { children: c }),
|
|
6400
6401
|
" to confirm"
|
|
6401
6402
|
] }),
|
|
6402
|
-
value:
|
|
6403
|
-
onChange: (e) =>
|
|
6403
|
+
value: v,
|
|
6404
|
+
onChange: (e) => y(e.target.value),
|
|
6404
6405
|
"aria-label": `Type ${c} to confirm`,
|
|
6405
6406
|
disabled: f
|
|
6406
6407
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webority/ui-react",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.19",
|
|
4
4
|
"description": "Webority shared React component library — App* primitives on react-bootstrap + the @webority/theme design system.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
},
|
|
29
29
|
"sideEffects": false,
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@webority/
|
|
32
|
-
"@webority/
|
|
31
|
+
"@webority/theme": "0.9.19",
|
|
32
|
+
"@webority/ui-elements": "0.9.19"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"bootstrap": "5.3.3",
|