@camstack/ui-library 1.2.267 → 1.2.268
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/composites/item-form-dialog.d.ts +8 -1
- package/dist/index.cjs +5 -1
- package/dist/index.js +5 -1
- package/package.json +1 -1
|
@@ -17,8 +17,15 @@ export interface ItemFormDialogProps {
|
|
|
17
17
|
readonly error?: string | null;
|
|
18
18
|
readonly width?: DialogContentProps["width"];
|
|
19
19
|
readonly children: ReactNode;
|
|
20
|
+
/**
|
|
21
|
+
* Pinned chrome between the title/error and the scrolling body — a tab
|
|
22
|
+
* strip, a status banner, anything that must not scroll with the fields.
|
|
23
|
+
* Under `scroll="body"` only `<DialogBody>` scrolls; this slot stays put
|
|
24
|
+
* with the header (same contract as a hand-rolled Dialog chrome).
|
|
25
|
+
*/
|
|
26
|
+
readonly beforeBody?: ReactNode;
|
|
20
27
|
/** Footer actions (Save, …). Cancel is always in the header. */
|
|
21
28
|
readonly footer?: ReactNode;
|
|
22
29
|
readonly testId?: string;
|
|
23
30
|
}
|
|
24
|
-
export declare function ItemFormDialog({ open, onClose, title, icon: Icon, error, width, children, footer, testId }: ItemFormDialogProps): JSX.Element | null;
|
|
31
|
+
export declare function ItemFormDialog({ open, onClose, title, icon: Icon, error, width, children, beforeBody, footer, testId }: ItemFormDialogProps): JSX.Element | null;
|
package/dist/index.cjs
CHANGED
|
@@ -58223,7 +58223,7 @@ function SectionToolbar({ start, end, className, testId }) {
|
|
|
58223
58223
|
}
|
|
58224
58224
|
//#endregion
|
|
58225
58225
|
//#region src/composites/item-form-dialog.tsx
|
|
58226
|
-
function ItemFormDialog({ open, onClose, title, icon: Icon, error, width = "lg", children, footer, testId }) {
|
|
58226
|
+
function ItemFormDialog({ open, onClose, title, icon: Icon, error, width = "lg", children, beforeBody, footer, testId }) {
|
|
58227
58227
|
if (!open) return null;
|
|
58228
58228
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Dialog, {
|
|
58229
58229
|
open: true,
|
|
@@ -58257,6 +58257,10 @@ function ItemFormDialog({ open, onClose, title, icon: Icon, error, width = "lg",
|
|
|
58257
58257
|
className: "mb-3 shrink-0 rounded-md border border-danger/40 bg-danger/10 px-3 py-2 text-xs text-danger",
|
|
58258
58258
|
children: error
|
|
58259
58259
|
}),
|
|
58260
|
+
beforeBody != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
58261
|
+
className: "shrink-0",
|
|
58262
|
+
children: beforeBody
|
|
58263
|
+
}),
|
|
58260
58264
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogBody, {
|
|
58261
58265
|
className: "pr-1",
|
|
58262
58266
|
children
|
package/dist/index.js
CHANGED
|
@@ -58199,7 +58199,7 @@ function SectionToolbar({ start, end, className, testId }) {
|
|
|
58199
58199
|
}
|
|
58200
58200
|
//#endregion
|
|
58201
58201
|
//#region src/composites/item-form-dialog.tsx
|
|
58202
|
-
function ItemFormDialog({ open, onClose, title, icon: Icon, error, width = "lg", children, footer, testId }) {
|
|
58202
|
+
function ItemFormDialog({ open, onClose, title, icon: Icon, error, width = "lg", children, beforeBody, footer, testId }) {
|
|
58203
58203
|
if (!open) return null;
|
|
58204
58204
|
return /* @__PURE__ */ jsx(Dialog, {
|
|
58205
58205
|
open: true,
|
|
@@ -58233,6 +58233,10 @@ function ItemFormDialog({ open, onClose, title, icon: Icon, error, width = "lg",
|
|
|
58233
58233
|
className: "mb-3 shrink-0 rounded-md border border-danger/40 bg-danger/10 px-3 py-2 text-xs text-danger",
|
|
58234
58234
|
children: error
|
|
58235
58235
|
}),
|
|
58236
|
+
beforeBody != null && /* @__PURE__ */ jsx("div", {
|
|
58237
|
+
className: "shrink-0",
|
|
58238
|
+
children: beforeBody
|
|
58239
|
+
}),
|
|
58236
58240
|
/* @__PURE__ */ jsx(DialogBody, {
|
|
58237
58241
|
className: "pr-1",
|
|
58238
58242
|
children
|